A French citizen and another holding dual French-Irish nationality have been freed from an Iranian prison, French authorities said Friday, the culmination of a hard-fought effort to bring them home.

Benjamin Briere and Bernard Phelan, who both had been held in a prison in Mashhad, in northeast Iran, were heading to Paris, Foreign Minister Catherine Colonna said.

"Free at last," President Emmanuel Macron tweeted. "It's a relief."

FRENCH POLICE CLASH WITH VIOLENT PROTESTERS DURING MASS MAY DAY DEMONSTRATIONS

Colonna spoke earlier Friday with Iranian Minister of Foreign Affairs Hossein Amir Abdollahian, a statement from her office said, without elaborating.

Iran’s state-run news agency, IRNA, said the French minister thanked Iran for releasing the two men and called the move an effective trust-building step.

Briere, 37, was arrested three years ago, in May 2020, while touring, for taking photographs with a drone in an area where cameras were forbidden and asking questions on social media about the headscarves women are required to wear in Iran.

He was convicted of spying and sentenced to eight years and eight months in prison, then reportedly acquitted this year.

woman with poster

A woman holds a photo of Benjamin Briere during a rally in Paris, France, on Jan. 8, 2022. Briere and Bernard Phelan, who were both held in a prison in Mashhad, Iran, have finally been released. (AP Photo/Adrienne Surprenant, File)

Phelan, 64, who holds both French and Irish nationality, was arrested seven months ago while visiting Iran for consulting activities for a tour company, according to French daily newspaper Le Parisien.

He was detained during the anti-government protests that began sweeping the country after 22-year-old Mahsa Amini, who was taken by the country’s morality police for wearing her hijab too loosely, died in custody, IRNA reported. Phelan was sentenced to spend more than six years in jail.

"We cannot tell you to what point we are relieved," Phelan's sister, Caroline, said in a statement, noting that her brother had been held for more than 200 days.

Colonna, addressing colleagues Friday at a European Union foreign ministers' meeting in Stockholm, Sweden, rejoiced with her Irish counterpart, Michael Martin, over the prisoners regaining their freedom.

Martin said that freeing the two prisoners was a team effort carried out "in very challenging circumstances."

FRENCH HECKLERS CALL FOR PRESIDENT EMMANUEL MACRON'S RESIGNATION DURING 'CROWD BATH'

"They shouldn't have had to go through this ordeal," he said.

Colonna said more diplomatic work with Tehran is needed "because there are, unfortunately, too many who are detained without reason in Iran." Four French people and numerous other European citizens remain behind bars.

The French citizens include Cecile Kohler, 37, and Chuck Paris, 69, who were arrested on May 7, 2022, after meeting with protesting Iranian teachers and taking part in an anti-government rally. France identified the two as a teachers’ union official and her partner on vacation in Iran.

French-Iranian academic Fariba Adelkhah, who was arrested in 2019, was freed from prison in February. She was released before then to serve part of her five-year sentence under house arrest but was ordered re-imprisoned in January 2022.

She was accused of "propaganda against the Islamic Republic’s political system" and "collusion to undermine national security."

CLICK TO GET THE FOX NEWS APP

Abdelkhah's companion, academic Roland Marchal, was freed in 2020, a year after his arrest in an apparent prisoner swap. His release came hours after French authorities released Jalal Ruhollahnejad, Iranian state TV said at the time.

The Iranian TV report said French authorities planned to deliver Ruhollahnejad to the United States for his alleged role in violating U.S. sanctions on Iran. The broadcaster said he was in jail in France for more than a year.

Occasional releases of Europeans from Iranian prisons are widely viewed as part of a cynical and delicate bid for favors.

Tensions between Iran, France and other European nations have deteriorated over time as Iran's stockpile of enriched uranium grows, compounded by Tehran's crackdown on anti-government and anti-hijab protesters.

The French foreign minister, addressing the release of Briere and Phelan, said that "you will understand that I cannot go into the details."