President Michel Aoun led a delegation on Tuesday to Iraq on the first visit by a Lebanese head of state to the war-scarred country, for talks that included ways to eradicate militancy.
Aoun held talks with Iraqi President Fuad Masum and Prime Minister Haider al-Abadi before he was due to travel to Armenia on Wednesday.
"We had constructive talks which reflect the historical and brotherly ties that link our two countries and our people," Aoun told a joint news conference with Masum.
"I would like to take advantage of this occasion to congratulate the Iraqi people for their firmness, patience and determination in the face of adversity… and terrorism," he said.
After an eight-year war with neighbouring Iran in the 1980s, and the 2003 US-led invasion, Iraq was targeted by the Islamic State (IS) group, which seized swathes of the country following a 2014 offensive.
In December, Abadi declared "the end of the war" against IS and complete control of Iraq's borders with neighbouring Syria, where militants still control pockets of territory.
Aoun told reporters that Lebanon, too, had suffered from militants but succeeded in pushing them back from a border region with Syria.
He said Arab states and the international community must build "joint efforts to fight against terrorism in an efficient and radical way, to eliminate them and end the factors that favour terrorist ideology".
With Iraq also looking to raise tens of billions of dollars to help reconstruct the country after the fight against IS, Aoun said Lebanese firms "with their extensive expertise" and investors were ready to get involved.
Abadi said talks had focused on "strengthening bilateral relations in the areas of economy, trade and reconstruction".
Aoun, a Christian, also visited a church in Baghdad where al-Qaeda militants killed 55 worshippers in 2010.
At the start of the visit, Masum surprised Aoun, a former general and army chief, with a birthday cake decorated with the Lebanese and Iraqi flags. Aoun turned 83 earlier this week.
Aoun was accompanied by cabinet ministers including the minister of industry, interior and tourism.
Meanwhile, a major donor meeting aimed at gathering support for Lebanon's economy will take place on 6 April in Paris, a Lebanese government source said on Tuesday.
The Cedre conference, also known as Paris IV, will be one of three international meetings due this year at which Lebanon will seek support for its economy and army, and help in dealing with the approximately one million Syrian refugees it is hosting.