The visit at the invitation of the UAE could signal a significant shift away from the hostility that has long defined relations between Shi'ite Muslim Hezbollah and the Sunni Muslim UAE, a strategic ally of the United States, analysts said.

There was no immediate response from the UAE foreign ministry to Reuters' requests for comments.

One of the sources, speaking on condition of anonymity, described Wafiq Safa's visit as a "new page" in ties between the UAE and Hezbollah, which is designated a terrorist group by the United States and its Gulf Arab allies.

Safa travelled to the UAE on Tuesday, the sources said. He runs Hezbollah's Liaison and Coordination Unit, responsible for coordinating with Lebanese security agencies, and is sanctioned by the United States.

The four sources familiar with Hezbollah's thinking said that the UAE had made contact Hezbollah with a message that they were seeking to release the Lebanese detainees, several of whom were serving life sentences.

The sources said the detainees had been arrested on charges including providing support and finance for Hezbollah, describing these as politically-motivated charges.

All four sources said the detainees would be released in the coming days and would accompany Safa back to Lebanon.

Two of the sources said the UAE asked Hezbollah's ally Syrian President Bashar al-Assad to pass on the message before the start of the Gaza war, during which Hezbollah and Israel have exchanged fire across the Lebanese-Israeli border.

There was no immediate response from Syria's information ministry to a Reuters request for comment.

One of the sources said the visit suggested an effort to alleviate "some of the regional tensions", without elaborating.

UAE foreign policy moves in recent years have included restoring ties with Assad, having once backed the rebels seeking to topple him, and normalizing ties with Israel in 2020.

The UAE began re-engaging Tehran in 2019, and Saudi Arabia re-established ties with Iran last year.

The tensions between Hezbollah and the UAE reflected a wider struggle between Iran and Sunni Arab Gulf states which fuelled conflicts including wars in Syria and Yemen.

The six-member Gulf Cooperation Council, which includes Saudi Arabia, declared Hezbollah a terrorist group in 2016. The GCC imposed sanctions on Hezbollah in 2013 for entering the Syrian war on Assad's side.

At a high point in regional tensions in 2019 following a drone attack on Saudi oil installations, Hezbollah leader Sayyed Hassan Nasrallah warned the UAE and Saudi Arabia that they should halt the conflict in Yemen to protect themselves.

The UAE led Arab moves to re-establish ties with Assad in recent years. Syria's membership in the Arab League was restored last year, after a more than decade-long suspension.

The UAE last year released 10 Lebanese nationals who had been detained there for two months, according to Lebanon's foreign ministry.

(Reporting by Laila Bassam; Additional reporting by Maha Dahan and Alexander Cornwell in Dubai; Writing by Maya Gebeily; Editing by Tom Perry and Ros Russell)

By Laila Bassam