A hojatoleslam, one rank below an ayatollah in the Shiite Muslim clergy, the 50-year-old Rowhani is secretary of the Supreme Council on National Security, the top decision-making body on security issues.
It was in this capacity that he, and not members of the elected government, headed negotiations with Britain, France and Germany that led to the deal Tuesday under which Iran agreed to comply with International Atomic Energy Agency (IAEA) demands.
Rowhani served for several years as vice president of the Majlis, or parliament, and was supported by the main conservative faction, the Society of Combattant Clerics.
It was then that he was appointed to manage the security council on behalf of supreme leader Ayatollah Ali Khamenei. The body groups the country's top officials, including the president, head of parliament, head of the judiciary and ministers of intelligence, foreign affairs, intelligence and interior.
Rowhani is also a director of Iran's Center for Strategic Studies, and is seen as close to powerful former president Akbar Hashemi Rafsanjani, who now head Iran's top political arbitration body, the Expediency Council.
Like many in Iran's leadership, Rowhani studied theology in the central holy city of Qom, before going on to earn a doctorate in law. It is this background that also earned him a seat on the Council of Experts, the body charged with electing Iran's all-powerful supreme leader.
But while being at the top of the clerical regime, in recent years he has emerged as a moderate voice. Several months ago he was quoted by the official Iran newspaper as saying clerics should not occupy all political posts.
Considered to be a pragmatist but a trusted pillar of the regime, Rowhani was clearly seen as an ideal choice as negotiator with Britain's Jack Straw, France's Dominique de Villepin and Germany's Joschka Fischer.
In unprecedented talks with the three foriegn ministers in Tehran Tuesday, Rowhani bowed to IAEA demands that the country come clean on its nuclear activities and sign up to a strict inspections regime in order to ease fears the country was on a fast track to developing nuclear weapons.
The fact that it was Rowhani, and not embattled President Khatami, who struck the deal gives analysts some confidence that the arrangement may stick.
"Hassan Rowhani is a personal representative of the supreme leader, and his presence alongside the three European ministers signifies that the accord adopted has backing at the very top," an Iranian political analyst explained. "Therefore this deal does carry weight."