27 May, 2017
Under the Iranian system, candidates need an absolute majority of votes to win.
Karoubi asked all Iranians to take part in the election and to protect the democratic process by choosing their preferred candidate, but said: "I will vote for Rouhani".
Five candidates, including incumbent President Hassan Rouhani, are running in the race.
Mr Raisi, is now the head of the powerful Imam Reza shrine and charitable foundation in the holy city of Mashhad and, in addition to attracting support from traditional conservatives, is seen as the favoured candidate of the security establishment.
"I am also very thankful", Raisi replied to the crowd. They included Mostafa Aqa-Mirsalim, Mostafa Hashemitaba, Es'haq Jahangiri, Mohammad Baqer Qalibaf, Seyyed Ebrahim Raisi and Hassan Rouhani.
Khamenei hasn't officially endorsed Raisi, but he has kept up criticism of Rouhani, which is at least marking out what Iran's Supreme Leader expects from a second-term Rouhani.
Some conservatives had been unhappy that Qalibaf was standing again and risking a split in the anti-Rouhani vote.
"A two-way race between Rouhani and Raisi will polarize society and mobilize the electorate", Ali Vaez, a senior Iran analyst at the International Crisis Group, said by phone.
A victory for Mr Raisi on Friday was vital for "the preservation of the interests of the people, the revolution and the country", he warned.
Rouhani, in a speech on Monday, told supporters he needed a strong mandate to push for political freedoms and the release of opposition leaders.
Rouhani and Jahangiri have claimed if the hardliners return to power the country will revert to suffocating security atmosphere.
It's not a given that most Qalibaf supporters will automatically switch to Raisi on May 19, said Aniseh Bassiri Tabrizi, research fellow at the Royal United Services Institute in London.
They were not happy that the maverick Tehran mayor was standing again and thereby raising the risk of splitting the anti-Rouhani vote.
Raisi thanked Qalibaf for his support, calling it a "revolutionary act", according to the semi-official Tasnim news agency. The two campaigned together on Tuesday, appearing at a packed rally in Tehran. Both presidential hopefuls jumped on the Islamic Republic's unemployment rate, which rose to 12.4 percent last year, up 1.4 percent from the previous year.