French President Emmanuel Macron has invited Saad Hariri and his family to come to France after his surprise resignation as Lebanese prime minister earlier this month, amid allegations that Saudi Arabia is holding him prisoner.

Macron's office said in a statement Wednesday that he made the decision after speaking to Hariri and Saudi Crown Prince Mohammed bin Salman. French Foreign Minister Jean-Yves Le Drian was in Saudi Arabia on Wednesday to meet with Hariri and Saudi officials.

France, Lebanon's onetime colonial ruler, has been trying to mediate in the crisis, and Macron paid a surprise visit to Saudi Arabia last week. Hariri's family has longtime connections to France.

"After speaking with Saudi Crown Prince Mohammed bin Salman and the Lebanese Prime Minister Saad al-Hariri, the president has invited Saad al-Hariri and his family to France," the Elysée said in a statement.

Macron, speaking to reporters Wednesday during a climate meeting in Germany, stressed he's not offering Hariri "exile," but wants him to come to France for a while to help calm tensions in Lebanon and dispel fears that he is a Saudi prisoner.

He said, "We need to have leaders who are free to express themselves," adding that "it's important that [Hariri] is able to advance the political process in his country in the coming days and weeks."

French officials say Hariri will probably come directly from Saudi Arabia. Hariri had said in the last few days he would return to Lebanon imminently.

Earlier Wednesday, Lebanon's president accused Saudi Arabia of detaining Hariri and asked UN Security Council countries and European governments to intervene.

It was the first time Michel Aoun described Hariri as a detainee of the kingdom since the resignation 12 days ago, which was delivered from Riyadh. Hariri, in a pre-recorded statement broadcast on Saudi TV, lashed out at Hezbollah and said he feared for his safety.

Hariri is a Saudi ally who holds dual citizenship.

Older brother expresses gratitude to Saudis

Iranian President Hassan Rouhani meanwhile ratcheted up the rhetoric Wednesday against Saudi Arabia, his country's main regional rival, saying the kingdom pressured Hariri to resign in a "rare" intervention in another country's affairs.

Hassan Nasrallah, the leader of Lebanon's Iran-backed militant group Hezbollah, has made the same accusation.

Hezbollah has said Saudi Arabia forced Hariri to resign in order to bring down his coalition government, which includes the group.

Bahaa Hariri, right, and Saad Hariri visit the scene on Feb. 19, 2005, where their father Rafik, the prime minister, was assassinated in Beirut. (Associated Press)

But Hariri's older brother, breaking his silence, says he supports his brother's decision to step down over the growing demands and actions of Hezbollah.

In his first public statement, ​sent to The Associated Press, Bahaa Hariri accused Hezbollah of seeking "to take control of Lebanon."

He also expressed gratitude to Saudi Arabia for "decades of support" for Lebanon's national institutions.

Bahaa Hariri's name has been mentioned in Lebanese media reports as a possible Saudi-backed candidate to replace his brother.

In a followup phone call from Monaco with the AP Wednesday, Bahaa Hariri declined to comment further.

​​Bahaa Hariri, 51, worked in his family's construction and development company, Saudi Oger, in Saudi Arabia. He then split, and now runs his own real estate and investment businesses. He rarely makes comments to the media.

His statement said the Hariri family has always stood for the principles that make Lebanon unique in the world, including its mosaic of different political backgrounds.

"Only a pernicious outside actor, such as Iran and its surrogate, Hezbollah, can upset the balance as this group now seeks to take control of Lebanon," Bahaa Haririr's statement read in part.

In April 2005, two months after their father, former prime minister Rafik Hariri, was assassinated in a Beirut bombing, the family announced that Saad would assume his father's political mantle, skipping over his brother, Bahaa, who is several years his senior.