DAMASCUS, Syria - Syria's president issued a decree Tuesday establishing diplomatic relations with Lebanon, and a foreign ministry official said the country will have an embassy in Beirut by the end of the year.

The two countries have not had formal diplomatic relations since they gained independence from France in the 1940s.

Lebanon and Syria agreed earlier this year to establish diplomatic ties and demarcate their contentious border. The West and Lebanese anti-Syrian politicians have long demanded Syria recognize Lebanon's sovereignty by establishing official relations.

The landmark agreement, which came during an official visit by the Lebanese president to Damascus in April, and Tuesday's formal decree reflect Syria's efforts to break with past isolationist policies and resolve tensions with its neighbours.

Syrian President Bashar Assad's decree, carried by the official Syrian news agency SANA, said that a "diplomatic mission for the Syrian Arab Republic at the embassy level will be established in the Lebanese capital." It did not provide details or say when the embassy would open.

But a Syrian Foreign Ministry official said it will happen before the end of the year.

"There will be a Syrian embassy and an ambassador in Lebanon soon and before the end of the year," the official told The Associated Press, speaking on condition of anonymity in line with regulations.

Relations between the two Arab nations have been lopsided in Syria's favour since the 1970s, when Syria sent its army into Lebanon and retained control there for nearly 30 years. Ties unraveled when former Lebanese Prime Minister Rafik Hariri was killed in a 2005 car bombing that many Lebanese blame on Syria - a charge Syria denies.

After Hariri's assassination, Syria caved to U.S.-led international pressure and withdrew its troops from Lebanon.

Establishing diplomatic relations remained a pressing demand by the anti-Syrian majority in Lebanon's parliament, which contended that the lack of official ties reflects Syria's refusal to recognize Lebanese sovereignty.

In addition to trying to improve relations with Lebanon, Assad has also recently sought indirect peace talks with Israel, mediated by Turkey, and says he wants direct talks next year.

The West is slowly changing its policy of the past three years of isolating Syria and has instead tried to engage it more in Mideast issues.