Iranian President Mahmoud Ahmadinejad has said his country supports a strong, unified Lebanon during his first state visit to the country.
His remarks came amid fears that his trip could threaten Lebanon's fragile political stability.
Crowds greeted Mr Ahmadinejad on his arrival in Beirut, mostly at the urging of the Iranian-backed Hezbollah group.
He later addressed a rally in an area where Iran funded reconstruction after the 2006 Hezbollah-Israel conflict.
On Thursday, in a move likely to anger critics, Mr Ahmadinejad will tour villages near Lebanon's tense southern border with Israel.
Two Lebanese soldiers, a Lebanese journalist and a senior Israeli army officer were killed in a clash on the frontier in August.
Mr Ahmadinejad's motorcade was showered with rice and flowers on its way from Beirut airport to the presidential palace on Wednesday.
"We support a strong and unified Lebanon. We will always back the Lebanese government and its nation," he said, standing beside President Michel Suleiman.
But he said Iran stood ready to help Beirut confront any Israeli aggression.
"We will surely help the Lebanese nation against animosities, mainly staged by the Zionist regime," he said, in reference to Israel.
Many people are alarmed at the visit, as Iran backs Hezbollah, the powerful Shia Islamist group whose war with Israel left 1,200 Lebanese and 160 Israelis dead.
Speaking during a visit to Kosovo, US Secretary of State Hillary Clinton said Washington rejected any efforts "to destabilise or inflame tensions" in Lebanon.
"We would hope that no visitor would do anything or say anything that would give cause to greater tension or instability in that country," she said.
Members of Lebanon's Western-backed parliamentary majority have called the visit a provocation, saying Mr Ahmadinejad was seeking to transform Lebanon into "an Iranian base on the Mediterranean".
Israel accuses Iran of supplying Hezbollah with weapons, but officials close to the group stress instead the Islamic Republic's support for reconstruction.
They say they have spent about $1bn (£0.6bn) of Iranian money since 2006 on aid and rebuilding.
"Ahmadinejad has done a lot for Lebanon, we are here to thank him," 18-year-old engineering student Fatima Mazeh told the Associated Press.
"He's not controlling Lebanon. Everyone has a mind and can think for himself. We are here to stand with him during the hardest times."
But elsewhere in the country, the group and its international backers are viewed with suspicion by some.
"I am disgusted by this visit," Mona, a 23-year-old Christian, told the AFP news agency. "They refer to [Ahmadinejad] as a saviour, but all he has brought us is trouble."
After talks with President Suleiman and Prime Minister Saad Hariri, who leads the majority 14 March Alliance, the Iranian leader addressed a huge rally of Lebanese Shia organised by Hezbollah in the southern suburbs of Beirut.
Mr Ahmadinejad praised Lebanon's resistance against "the world's tyrants".
The Hezbollah leader, Sheikh Hassan Nasrallah - speaking by video link rather than in person - said Iran had no agenda of its own to impose on Lebanon.
On Thursday, Mr Ahmadinejad is expected to tour the border towns of Bint Jbeil and Qana, the scene of some of the worst fighting in 2006.
The state visit also comes amid tension over a UN inquiry into the 2005 assassination of the former Lebanese Prime Minister, Rafik Hariri.
The UN tribunal is believed to be close to issuing indictments, including ones naming members of Hezbollah. Mr Hariri is under pressure from Hezbollah and Syria to denounce the inquiry into his father's death.