Lebanon's absent prime minister has accepted an invitation for an official visit to France, French and Lebanese diplomats said Thursday, nearly two weeks after his abrupt resignation stirred rumors that he was being held captive in the Saudi Arabian capital, Riyadh.

French Foreign Minister Jean-Yves Le Drian met with Saad Hariri on Thursday in Riyadh and said that the prime minister would be traveling to Paris "soon." It was unclear whether Hariri would take his family on the trip.

The announcement added another layer of mystery to the circumstances of Hariri's shocking decision to quit his post this month. His resignation — which he blamed on pressure from Iran and its Lebanese Shiite proxy, Hezbollah — stunned Lebanon and the wider region and raised fears the country would plunge into factional turmoil.

But Lebanese officials have said that Hariri, who is a dual Lebanese-Saudi citizen, had been forced to resign by Saudi authorities and was unable to move or speak freely from Riyadh. Lebanon's president, Michel Aoun, said Wednesday that Hariri was a "hostage," and that his government would not accept such an "attack on Lebanese sovereignty."

Later, Aoun told visiting politicians that he expected Hariri to arrive in Paris on Saturday, Lebanese media reported. The visit appeared aimed at defusing tensions and could pave the way for Hariri to officially submit his resignation in person in Beirut, officials said.

The flurry of diplomacy capped nearly two weeks of political chaos and fevered speculation over Hariri's fate, which threatened to upset the delicate power-sharing agreement on which Lebanon's government is formed. The pact divides political power among Christians and Sunni and Shiite Muslims, and any attempt to sideline one faction could tip the country into sectarian conflict.

Hariri, a Sunni and ally of Saudi Arabia, was appointed prime minister a year ago after months of political deadlock. The Lebanese constitution says that the prime minister must be Sunni and the president must be Christian. It says the speaker of parliament should be a Shiite Muslim.

But because Iran, which is Shiite, and Saudi Arabia, which is Sunni, have competed for influence in the region, the threat of upheaval in Lebanon has intensified. Iran has long backed Hezbollah, Lebanon's most powerful political and military movement and key to Iran's regional reach.

For its part, the Saudi government has sought to bolster Hariri and his Sunni bloc in Lebanon and have fought what Saudi officials claim are Iranian proxy forces in Yemen. Iran denies having direct links to the Houthi forces in Yemen that drove out the Saudi-backed president in 2015.

Some observers believe Saudi officials wanted to pressure Hezbollah, which is part of the Lebanese government, by staging Hariri's resignation. Riyadh believed that move would strip the coalition government of legitimacy, analysts said, potentially opening the way for military options against Hezbollah.

On Thursday, Saudi Foreign Minister Adel al-Jubeir rejected accusations that his government had abducted Hariri. In a joint news conference with the French foreign minister, Jubeir said that Hariri was in Saudi Arabia of his own free will and that he was free to travel at any time.

French President Emmanuel Macron had extended the invitation Wednesday through Le Drian in Riyadh but stressed that it was not an offer of political exile. Macron stepped in, a former adviser said, amid an American diplomatic vacuum in the region.

"To the Saudis, to the Lebanese and indirectly to the Iranians, [Macron] is saying: 'You are on the brink of catastrophe. You have to de-escalate and the U.S. is not there,' " said Dominique Moisi, a foreign policy adviser to Macron during his presidential campaign.

In Lebanon, an official at the president's office cautioned that the crisis is not yet over.

"He can resign, as long as he is free to do what he wants," the official said. He spoke on the condition of anonymity because of the sensitivity of Hariri's situation.

But as long as he is still in Saudi Arabia, the official said, "we believe that it is a hostage situation."

James McAuley in Paris contributed to this report.