Former Iranian president Ali Akbar Hashemi Rafsanjani in 2011. (ATTA KENARE/AFP/GETTY IMAGES)

Two of Iran’s most controversial figures announced Saturday that they are seeking to be candidates to replace Mahmoud Ahmadinejad as Iran’s president.

The emergence of two-term former president Ali Akbar Hashemi Rafsanjani and Ahmadinejad’s top aide, Esfandiar Rahim Mashaei, dramatically changed the landscape of an election that until recently most observers thought would be fought between conservative candidates loyal to Iran’s supreme leader, Ayatollah Ali Khamenei.

Instead, if confirmed as candidates, both men would be likely to draw support from Iranians who have backed reformists in the past.

The arrival of Rafsanjani, 78, at election headquarters here with less than 10 minutes left to register his candidacy caused a frenzy among supporters and journalists, who have speculated in recent weeks that the longtime political figure would enter the race.

President from 1989 until 1997, Rafsanjani is considered a founding father of the Islamic Republic and would probably have the support of another former president, Mohammad Khatami. Thought to be one of Iran’s wealthiest people, Rafsanjani has also become a symbol of the corruption that has long afflicted politics here. But others see him as a pragmatic leader who might be able to mend Iran’s relations with the United States.

Amid tight security, Rafsanjani made his way through the crowd to the registration center. As he arrived at the designated desk, it became clear that Mashaei, flanked by Ahmadinejad, was registering simultaneously just a few feet away.

Afterward, Mashaei and Ahmadinejad entered a hall packed with journalists where the would-be candidate held up an ink-stained finger and his Iranian identity certificate, signifying that he had registered. Like the current president, Mashaei has fallen out of favor with the ruling clerics; some have accused him of being part of a “deviant current” that is opposed to clerical rule.

Critics and rivals of Ahmadinejad have accused the current president of trying to employ what they call a “Putin-Medvedev” plan similar to the maneuvers atop Russia’s government, in which Ahmadinejad would stay close to power if Mashaei becomes president and then run for a third term after being out of office for four years, which is allowed under Iran’s constitution.

The actions by Rafsanjani and Mashaei instantly infused the race with an energy it had lacked, and their candidacies, if approved, will likely inspire greater voter turnout in the June 14 election. The 12-member Guardian Council has until May 23 to approve or reject prospective candidacies, a decision it bases on factors such as education and loyalty to the Islamic revolution and its political system.

The initial process of registering to be a candidate is open to all, and almost 700 Iranians did so during the process that began Tuesday. But only a handful of candidates are expected to ultimately appear on the ballot.

Both Rafsanjani and Mashaei have been central players in Iranian politics for years, making it potentially difficult for the council to reject them. Rafsanjani said in the past week that he would run only with the supreme leader’s approval.

“Iran’s election picture will remain hazy until vetting is done — perhaps longer,” said Reza Marashi, research director at the National Iranian American Council in Washington. “But today reaffirms Lesson 1 in Iranian politics: Iran has politics.”

Saturday also saw several members of the conservative faction known as principlists, for their loyalty to the founding principles of the Islamic republic, enter the race. Most prominent were the mayor of Tehran, Mohammad Bagher Ghalibaf, and longtime foreign minister Ali Akbar Velayati, a pediatrician who trained at Johns Hopkins University.

Ghalibaf and Velayati, along with former Parliament speaker Gholam Ali Haddad-Adel, compose a three-candidate coalition. They have agreed to support the one among them with the most public support leading up to the election.

Velayati, an adviser to Khamenei, is believed by many to be the head of state’s preferred candidate.

Other candidates who registered Saturday included Saeed Jalili, the country’s chief nuclear negotiator; the spokesman for Iran’s Foreign Ministry, Ramin Mehmanparast; and Ali Akbar Javanfekr, who formerly ran state television and is a top ally of Ahmadinejad.

At least 20 high-ranking politicians were among the many who signed up to become candidates, but it was the emergence of Rafsanjani and Mashaei in the final moments of the registration process that captured the attention of journalists who had been waiting since morning for clarity about whether either man would run.

As the afternoon wore on and a procession of conservative candidates arrived, the likelihood that Mashaei or Rafsanjani would appear seemed to fade. As some people left the premises, a surge of activity erupted near the entrance, where riot police and other security forces had gathered earlier.

Once Rafsanjani was inside the building, his presence elicited a reaction normally reserved for much younger celebrities: Crowds pushed to get close to him and some people cried, saying he had come to save the country.

“This is one of the strange days in our history,” remarked a longtime domestic news photographer who spoke on the condition of anonymity, citing the sensitivity of the event and fear of retribution for being quoted in a U.S. newspaper.

Mashaei and Rafsanjani are widely seen here as challengers of the political status quo, but neither hinted at any split between themselves and the ruling system.

Rafsanjani told reporters, “I have come to serve our people, and they have the right to vote for me or not.”

Asked what he would do if the Guardian Council rejects his candidacy, Mashaei replied, “We all must accept the law, and so do I.”

After Mashaei addressed reporters, Ahmadinejad spoke in support of his top aide, who is married to the president’s daughter. “It is 28 years that I’ve known Mashaei. He is a believer. He’s pious and practical,” Ahmadinejad said, adding, “Mashaei is Ahmadinejad, and Ahmadinejad is Mashaei.”