Sheikh Sharif Sheikh Ahmed was elected last month
Somalia's new President, Sheikh Sharif Sheikh Ahmed, has offered an olive branch to Islamist hardliners during a tour of the capital, Mogadishu.
He told cheering crowds he was prepared to discuss peace with any group opposed to UN-sponsored peace efforts.
The moderate Islamist also visited a police base and held discussions with traditional and civil society leaders.
Mortars were fired at the presidential palace after the new leader arrived in the capital on Sunday.
President Ahmed told large crowds on Monday: "The new period the country is going through is for peace.
"We will say to everyone who is opposing us: 'We are ready to discuss with you about our problems, we are open to peace, we welcome peace and no-one's role will be ignored.'"
The BBC's Mohammed Olad Hassan in Mogadishu says President Ahmed's remarks were aimed at the hardline Islamist al-Shabab militia.
The group recently seized Baidoa, the seat of parliament, and controls much of southern Somalia. It has been holding protests against the new president.
Our correspondent says security was provided on Monday by African Union peacekeepers, government troops and forces from the president's party, the Alliance for the Re-liberation of Somalia (ARS).
The 44-year-old former teacher was elected by MPs in January in neighbouring Djibouti, replacing President Abdullahi Yusuf, who resigned a month earlier after a power struggle.
Mr Ahmed used to lead an Islamist movement that took control of Mogadishu before being ousted by Ethiopian-led forces in late 2006.
Somalia has had no stable central government since 1991.