19 May, 2017
There are about 56 million eligible Iranians and they can vote at one of 63,500 polling stations across the country.
Iranians are also voting for local councils, with reformists hoping to overturn the conservatives' narrow majority in the capital. Iran's president is subordinate to the supreme leader but still powerful with considerable influence over both domestic policy and foreign affairs.
His main challenger is seen as Ebrahim Raisi, 56, a hardline cleric and former prosecutor who is close to Supreme Leader Ayatollah Ali Khamenei. Eshaq Jahangiri, a candidate in the election until a few days ago, pulled out and asked his backers to support Rouhani.
Because it had the tacit approval of supreme leader Ayatollah Ali Khamenei, Raisi supports the 2015 deal with world powers, which saw curbs to Iran's nuclear programme in return for an easing of sanctions.
He has promised further outreach to the world if re-elected and to have other non-nuclear sanctions against Iran lifted within the next four years.
Mr Rouhani voted about an hour later.
"We have not seen the impact of the nuclear deal on our dining tables at all". "We remember Ahmadinejad. I looked at Raisi, and I thought, we can not have another Ahmadinejad". In practical terms, that could mean rescinding the agreement. Raisi has even been discussed as a possible successor to him, though Khamenei has stopped short of endorsing anyone.
There was no immediate comment from Rouhani's team.
This is the issue driving the campaign on all sides as the Islamic republic struggles with 12.5% unemployment and minimal growth outside the oil sector.
The new contract model is created to offer more flexible fees for services than the unpopular earlier "buyback" contracts, with additional incentives for partners willing to take on complex or high-risk projects.
Rouhani may be counting on the first contract awards to make a splash in his second presidential term.
"We could not let Raisi win because people couldn't be bothered to vote".
Despite the removal of nuclear-related sanctions in 2016, lingering unilateral US sanctions that target Iran's record on human rights and terrorism have kept foreign companies wary of investing in Iran, limiting the economic benefits so far. However, political scientists and analysts immediately noted that not all of Ghalibaf's votes will go to Raisi, only about 70%, because Raisi, unlike Ghalibaf, adheres to more radical conservative line. But he sees Rouhani as the best choice available.
Iran has gas reserves of 34 trillion cubic meters, the world's second largest after Russian Federation, yet it is barely a net gas exporter, with imports from Turkmenistan offsetting about two-thirds of its current limited exports to Turkey, Azerbaijan and Armenia. Then he told a rally that he had not forgotten his 2013 campaign promises, openly stating: "Either they have been achieved, or I have been prevented from keeping them".
He has already overseen a significant boost in output from South Pars. Other Iranian politicians spoke out as well. Also, no incumbent president has failed to win reelection since 1981.
Most Iranian observers view the performance of Iran's steel, auto and petroleum industries under Rouhani as acceptable.
With new steel production capacity coming online, one private steel producer said Iranian steelmakers need export markets more than ever, and Rouhani has tried to make that part of his legacy.
Former Iranian Judoka Arash Miresmaeili poses for a picture after casting his ballot during the presidential and city and village council elections in Tehran on May 19, 2017. That includes Rouhani openly criticizing hard-liners and Iran's powerful Revolutionary Guard, a paramilitary force now involved in the war in Syria and the fight against Islamic State militants in neighboring Iraq. Conversely, an election defeat for Raisi would deal a heavy blow to his prospects for taking Khamenei's crown.