Syria and Iraq are to restore diplomatic relations, after a break of more than 20 years.
Muallim (left) is the most senior Syrian to visit Iraq since 2003
Agreement on restoring all diplomatic ties was announced in Baghdad by Foreign Minister Hoshyar Zebari and his Syrian counterpart Walid Muallim.
Correspondents say Iraq hopes the move will help to stem a flow of militants across the border with Syria.
Relations were severed in 1982, during Saddam Hussein's rule and soon after the beginning of the Iran-Iraq war.
Syria and Iraq were governed by competing branches of the pan-Arab Baathist movement, and ties have been largely antagonistic.
Mr Muallim, who has been in Baghdad since Sunday, is the highest-ranking Syrian official to visit Iraq since the US-led invasion in 2003.
The agreement came as US forces launched a raid on Baghdad's Shia district of Sadr City.
UN Secretary General Kofi Annan said on Tuesday the US was trapped in Iraq and had to find the right time to leave without causing even greater chaos.
"The US is in a way trapped in Iraq, trapped in the sense that it cannot stay and it cannot leave," he said.
"The timing of its departure will have to be optimal."
Iraqi government spokesman Ali al-Dabbagh hailed the agreement with Syria as historic.
"The latest talks between the Syrian and Iraqi side have been crowned by declaring a new era with the participation of the Syrian brothers in working on the security and stability with Iraq," he told the Associated Press news agency.
Mr Zebari said the two sides had also agreed to cooperate on security issues.
They also agreed to allow US forces to stay in the country until they were no longer needed.
White House National Security Council spokesman Gordon Johndroe said the US had always encouraged Iraq's neighbours to assist its government.
"Syria needs to now demonstrate that it is committed to constructive engagement and fostering an Iraq that can govern, sustain and defend itself," he told AFP news agency.
The move comes as efforts to involve Iran and Syria in stabilising Iraq appeared to be gaining momentum.
Earlier, the Iraqi president, Jalal Talabani, accepted an invitation to go to Iran on Saturday.
There are reports that the Syrian president, Bashar al-Assad, may also go to Iran, but there has been no confirmation from Damascus.
US 'more amenable'
The US administration gave a cautious welcome to news that the Iraqi president would be visiting Iran, but analysts say the US government has been more amenable to regional diplomacy since heavy losses for President George W Bush in 7 November mid-term elections.
A proposal that Washington talk directly to Syria and Iran about helping to reduce the violence in Iraq is being widely discussed.
But the BBC's David Loyn in Baghdad says events may be moving faster than Washington and London predicted or even wanted at this stage.
In the US raid on Sadr City, three people including a young boy were killed and at least 11 injured in the raid, as troops called in air strikes after clashing with militants.
Seven people were arrested, including the alleged leader of a militant group thought to be behind the kidnapping of a US soldier, the US military said.
Iraqi-born Specialist Ahmed Qusai al-Taie was abducted on 22 October while visiting relatives.
In other violence, US forces killed three suspected insurgents and detained a further four in a raid on two buildings elsewhere in Baghdad.