Sole reformist candidate Mohammad Reza Aref said on Tuesday he was pulling out of Iran's presidential election following calls for reformists to rally around moderate candidate Hassan Rowhani.
Aref said on his website that former reformist president Mohammad Khatami had sent him a letter advising that it "would not be wise" for him to remain as a candidate in Friday's vote.
Khatami's intervention comes amid growing calls in recent days from within the reformist camp for Aref to quit in favour of Rowhani.
Khatami's advisory council in a statement said it was backing Rowhani as the "reformist camp candidate."
Rowhani was Iran's former top nuclear negotiator under Khatami.
He has also served as top security official under the pragmatic former president Akbar Hashemi Rafsanjani. He still enjoys the backing of Rafsanjani.
"I will follow the paths of Khatami and Rafsanjani," Rowhani was quoted by media as saying on Monday at a rally in the western Iranian 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 advocates a policy of flexibility in negotiations over the Islamic republic's controversial nuclear drive, which world powers believe masks an atomic weapons programme despite repeated denials by Tehran.
Aref is the second of the eight candidates in the election to withdraw.
Ex-parliamentary speaker Gholam Ali Haddad Adel, seen as close to supreme leader Ayatollah Ali Khamenei, pulled out of the race on Monday.