At the beginning of 2024, a university president in Budapest, Hungary, received an unexpected request from a high-ranking Hungarian government official.

Ahmadinejad served as Iran’s president from 2005 to 2013, a period marked by escalating tensions with the West and Israel.

The official informed the university president, Professor Gergely Deli, that the Ludovika University of Public Service should organize a climate change conference and extend an invitation to an unlikely guest: Mahmoud Ahmadinejad, the widely disapproved former Iranian president.

Even more surprising was the official’s disclosure to Deli that the conference was merely a cover for Ahmadinejad to hold secret talks in Budapest with elements of Israeli intelligence, his declared enemy.

Deli realized this invitation could damage both his reputation and that of the university. However, he stated in an interview that he believed he might be playing a role in saving lives.

He said, "You have two enemies, and if those two enemies want to talk to each other, you better do what you can to make them talk."

According to U.S. and Iranian officials familiar with the operation, who spoke on condition of anonymity due to the sensitivity of the intelligence, Ahmadinejad’s 2024 visit to the university and his second visit the following year were part of a years-long Israeli effort to turn him into an intelligence asset who could, at the right moment, be installed as the new leader of Iran.

Former U.S. officials said recruiting Ahmadinejad was such a high priority for Israel that the then-head of the Israeli intelligence agency, David Barnea, personally traveled to the Hungarian capital in 2024 to meet with Ahmadinejad. They added that the Mossad, Israel’s foreign intelligence agency, informed the U.S. Central Intelligence Agency (CIA) shortly thereafter that it had been in contact with Ahmadinejad.

A photo posted by the 'Dolat-e Bahar' website, which speaks for the office of former President Mahmoud Ahmadinejad, shows him participating in the funeral of former Supreme Leader Ali Khamenei in Tehran on Monday.

Israel's decision to build a regime change plan centered on Ahmadinejad represents an extraordinary turn in its relationship with the former Iranian president, who is known for accelerating Iran's nuclear program, repeatedly calling for the destruction of Israel, and denying the Holocaust.

According to U.S. officials, Israel has secretly paid Ahmadinejad in recent years to cover housing and travel expenses, and Israeli operatives have met with him abroad on several occasions, including during his trips to Budapest.

This effort culminated in late February of this year, during the first days of the U.S.-Israeli war on Iran, through a daring operation to extract the former leader, who had been living under tight surveillance in Tehran. The goal was to launch the plan aimed at overthrowing the current regime and installing Ahmadinejad. However, the plan failed.

On February 28, an Israeli airstrike hit Ahmadinejad's compound, targeting his bodyguards' building and his armored vehicle. Following the strike, according to four senior Iranian officials, a black Peugeot arrived, picked up Ahmadinejad, and sped away from the chaotic scene.

U.S. and Iranian officials familiar with the operation said the car was driven by Mossad operatives, who transported Ahmadinejad to a secret safe house inside Iran.

However, the former Iranian president was disgruntled by the frantic rescue operation and appeared disappointed by the Israeli plan to return him to power, according to people with knowledge of the events.

He later left the safe house under circumstances that remain unclear. Ahmadinejad did not appear in public again until July 6, when he briefly participated in the funeral procession of the late Iranian leader Ali Khamenei.

His current status remains uncertain. But four senior Iranian officials said Ahmadinejad is in the custody of the Islamic Revolutionary Guard Corps' intelligence agency and is currently under house arrest after Iran learned many details of his communications with Israel.

Israeli officials have not publicly commented on the plan to install Ahmadinejad as the leader of Iran, which was part of a broader attempt to topple the government in Tehran. Another component of the plan involved arming and training Iranian Kurdish opposition forces based in northern Iraq to cross the border into western Iran, seize territory there, and eventually advance toward Tehran, a plan that never materialized.

Tamir Hayman, the former head of the Israeli Military Intelligence Directorate, said during the 'Firing Line' program broadcast by PBS in May, after The New York Times first revealed details of Ahmadinejad’s role in the plan: "The regime change plan included a series of very, very unique special operations that were supposed to be carried out." He added: "And Ahmadinejad was part of that series."

Mossad officials did not respond to requests for comment. Ali Akbar Javanfekr, a spokesperson for Ahmadinejad, also declined to comment.

Transformation after the presidency

As president of Iran between 2005 and 2013, Ahmadinejad was the country's most prominent hardliner. He called for the eradication of Israel, and during his tenure, Iran resumed its uranium enrichment program, raising suspicions that it was pursuing a covert nuclear weapons program. He also ordered a violent crackdown on the nationwide uprising that erupted to protest his 2009 re-election, and his era witnessed mass executions of dissidents and the imprisonment of opponents and rivals by the judiciary.

Ahmadinejad waving as he arrives at the interior ministry's presidential candidate registration committee headquarters in June 2024 (Archive - EPA).

However, in the years after leaving the presidency, Ahmadinejad softened his positions and curbed the anti-Israel rhetoric that characterized his years in power. He was keen to showcase his new, more moderate image by conducting interviews and giving speeches in which he discussed Iranian pop culture, criticized security forces for violent crackdowns, and accused the ruling class of financial corruption.

He also abandoned his signature loose-fitting khaki jacket and began wearing tailored suits. He groomed his unkempt beard, appeared to have undergone Botox treatments, and began learning English.

At his office in Tehran, he held one-hour public meetings every morning to listen to the complaints of ordinary citizens, some of whom came to him seeking help in dealing with government bureaucracy. Occasionally, he would write letters to ministries recommending that some applicants be granted loans. He also traveled regularly across the country, meeting his supporters in cities and rural provinces.

Ahmadinejad speaks with his ally Saeed Jalili, an advisor to the Iranian Supreme Leader, on the sidelines of the opening ceremony of the Assembly of Experts in Tehran (Archive - ILNA).

Ahmadinejad's relationship with the Iranian government was complex. Senior leaders marginalized him and imposed restrictions on his movements, but they allowed him to sit alongside other high-ranking officials on a high-level council that advises the Iranian Supreme Leader. He attended a meeting of that council in February, a few days before the war broke out.