King Salman bin Abdulaziz receiving Lebanese Prime Minister Saad Hariri at the Saudi Royal Palace in Riyadh, 28 February (AFP)
Saad al-Hariri arrived in Riyadh on Wednesday, his first trip to Saudi Arabia since he announced his resignation there during a visit last November, which triggered a political storm in the region.
A statement by the Lebanese prime minister's office said he left Beirut late on Tuesday in response to an invitation from King Salman.
Hariri would hold talks with Salman and the powerful crown prince, Mohammed bin Salman.
He had accepted the invitation delivered to him by Saudi envoy Nizar al-Aloula, whom he met in Beirut on 26 February.
"Saudi Arabia's main goal is for Lebanon to be its own master, and it is keen on Lebanon's full independence," Hariri said after meeting the Saudi envoy al-Aloula.
— Saad Hariri (@saadhariri) February 28, 2018
Translation: With the Custodian of the Two Holy Mosques King Salman Bin Abdulaziz in al-Riyadh.
The Saudi envoy's visit to Beirut came before 6 May legislative elections, Lebanon's first since 2009 following three extensions of parliament's mandate.
Aloula also met the president, Michel Aoun, who told him of Lebanon's desire to "maintain the best relations" with the oil-rich Gulf state.
Hariri last travelled to the Saudi kingdom on 3 November and resigned in a televised statement a day later.
Lebanese officials accused Saudi Arabia of forcing Hariri, its long-time ally, to quit and putting him under effective house arrest until France intervened.
Riyadh has denied this.
He returned home weeks later and withdrew his resignation, drawing a line under the crisis that had raised fears for Lebanon's economic and political stability.
The crisis thrust Lebanon on to the frontline of a Middle East contest for power, pitting a Saudi-led bloc against Iran and its allies, including the Lebanese Hezbollah movement.
After his return, Hariri's coalition government, which includes Hezbollah, reaffirmed a state policy of staying out of conflicts in the Arab world.
Lebanon declared its policy of "dissociation" in 2012 to keep the deeply divided state out of regional conflicts such as the war in neighbouring Syria.