Sole reformist candidate Mohammad Reza Aref pulled out of Iran's presidential race on Tuesday as the reformist camp including ex-president Mohammad Khatami urged voters to rally around Hassan Rowhani, a moderate.
Aref said on his website that Khatami had sent him a letter advising that it "would not be wise" for him to stay in the race for the election on Friday.
Hours later, Khatami called on voters to support Rowhani.
"Due to the duty I have to the country and the fate of the people of Iran I will vote for my esteemed brother Hassan Rowhani," Khatami said on his website.
"I ask all, especially reformists and those who seek the dignity and elevation of the nation," to come and vote for "Hassan Rowhani in order for their demands to be met."
Khatami's intervention came amid growing calls in recent days from within the reformist camp for Aref to quit in favour of Rowhani.
Khatami's advisory council had already said it was backing Rowhani as the "reformist camp candidate."
However, Aref did not declare his support for any other candidate in the statement announcing his withdrawal.
Rowhani had been top nuclear negotiator under Khatami and served as a senior security official under the pragmatic former president Akbar Hashemi Rafsanjani, whose backing he still enjoys.
"I will follow the paths of Khatami and Rafsanjani," the media quoted Rowhani as saying on Monday at a rally in the western province of Kurdistan.
"I do not approve of the current foreign policy. We should try to have good (international) interactions to gradually reduce the sanctions and finally remove them," he added.
Rowhani has advocated flexibility in negotiations over Iran's controversial nuclear drive, which world powers believe is masking an atomic weapons programme despite repeated denials by Tehran.
When Rowhani was Iran's top nuclear negotiator, Tehran agreed to suspend uranium enrichment and to implement snap inspections by the UN atomic watchdog in accordance with the nuclear non-proliferation treaty.
Aref is the second of the eight candidates to withdraw.
Ex-parliamentary speaker Gholam Ali Haddad Adel, seen as close to supreme leader Ayatollah Ali Khamenei, did so on Monday, saying he was "promoting the chances of a conservative election."
Rowhani, 64, will now face other major contenders hardline conservative Saeed Jalili, former foreign minister Ali Akbar Velayati and Tehran's mayor Mohammad Baqer Qalibaf.
Hopefuls Mohsen Rezai and Mohammad Gharazi are trailing in polls.
Supporters of Jalili, head of the Supreme National Security Council and tasked with negotiating with world powers, have harshly criticised Rowhani's approach during his tenure, saying he made too many concessions in return for too little.
Rowhani quit his post in 2005 over disagreement with President Mahmoud Ahmadinejad, as Iran resumed the sensitive uranium enrichment work that it had suspended.
Pro-reformist and moderate newspapers hailed Aref's withdrawal.
The reformist Arman ran the headline "Aref greets Rowhani... the great consensus."
The Etemad newspaper ran its main story as: "Reformist votes Rowhani," adding that the decision follows weeks of deliberations.
Aref's move has prompted the conservative camp to call for union among the remaining conservative candidates.
"In case of division of the vote among the conservatives, then the conservative candidate will be elected with just a few more votes than his reformist rival," wrote the publisher of the hardline Kayhan newspaper, Hossein Shariatmadari.