By Feisal Omar and Omar Faruk

MOGADISHU (Reuters) – In the roofless, bullet-ridden building that houses Mogadishu's National Theatre, Somali musicians staged a concert for the first time in 20 years, a sign of a marked improvement in security in the war-ravaged Horn of Africa country.

Under pressure from African Union and Somali troops, al Qaeda-linked militants withdrew from Mogadishu in August prompting a return to relative calm in the capital, although the rebels still manage to launch sporadic attacks.

On Tuesday the al Shabaab militants launched mortars at the presidential palace – a mere 300 metres (yards) away from the theatre – for the second day running, drawing retaliatory fire from African peacekeepers in some of the heaviest violence to rock the capital's centre in months.

Despite the violence, hundreds of Somali residents as well as the country's senior officials, packed the National Theatre on Monday to attend an afternoon of song and dance to mark the reopening of the building.

Dressed in bright yellow scarves and capes, Somali women sang to the strumming of guitars as the audience applauded, tapped their feet on the steps and waved the Somali flag.

"We are very happy to be reopening our national theatre and singing inside it today. If we are alive, our theatre will be alive," singer Said Daud Ali, sporting a red striped shirt and sunglasses, told Reuters after the concert.

Somalia has been mired in turmoil since warlords toppled dictator Mohamed Siad Barre in 1991, leaving militants, militia groups and clan leaders all fighting for control of parts of the anarchic country.

Highlighting the threat militants still pose to the capital, armoured African Union vehicles and Somali government troops deployed along the road leading up to the theatre, where Somali President Sheikh Sharif Ahmed took a front-row seat.

"The concert talked about love and politics … the concert also told us about our past days, the good and the bad. We have to participate in a new Somali history and repair our houses, shake hands and unite," Ahmed told the audience.

"We have to concentrate on peace, education and progress – let's forget the bad events we experienced," he said.

Many Somali artists, actors and singers have fled the violence over the last two decades, especially as al Shabaab cracked down on any forms of art they deemed unIslamic according to the strict interpretation of sharia law that they adhere to.

Ahmed said the government would now support its artists.

"The reopening of the theatre shows a new occasion: peace. Our musicians, singers, poets have had bad days. The government will give them the value they deserve," he said, marking the end of the concert.

Abdullahi Iman, a former actor who was the master of ceremonies at Monday's event, said he returned from Stockholm after fleeing Somalia 13 years ago.

"I arrived this month to evaluate the state of Mogadishu," he told Reuters.

"Somalia is relatively peaceful now but more ruined than before. I will return. I hope this concert marks a good start."

(Additional reporting by Abdi Sheikh and Abdurrahman Hussein; Writing by Yara Bayoumy; Editing by Richard Lough and Paul Casciato)