Citizens of Somalia celebrated the election of their new president on Thursday, a day after the troubled nation held its most democratic election in decades, as could be seen in images supplied by an epa photographer on site.

Mohamed Abdullahi Farmajo replaced President Hassan Sheikh Mohamud following an election late on Wednesday that was held, for security reasons, in Mogadishu's international airport.

The new president, Somalia's 9th, received the backing of 184 of Somalia's 328 members of Parliament.

During the voting, areas of the nation under government control were put on lock-down, traffic was halted around the capital city and a no-fly zone was implemented in an attempt to quell the persistent threat of Islamist militants.

With their army-issued assault rifles and military fatigues, several Somali soldiers who, like thousands of others, had been on guard throughout the night, raised their hands in celebration of the successful ballot, as witnessed by an epa correspondent.

In the vicinity, a group of civilians pointed towards a Farmajo campaign poster overlooking a quiet Mogadishu street.

Farmajo, who holds both Somali and United States citizenship, had previously served as Somalia's prime minister, but left his role after just eight months to return to work in Buffalo, New York.

The US State Department congratulated Farmajo soon after his election to the presidency.

"We congratulate Mr. Mohamed Abdullahi Mohamed (Farmajo) on his selection as the next President of the Federal Government of Somalia and look forward to working closely with him and a new government," the statement said.

It commended the efforts of Somali security forces and soldiers from the African Union who had worked for months in the lead-up to the election to maximize safety levels in a nation blighted by a civil war with the Somali militant group, al-Shabab.

The US State Department acknowledged, however, several reports of irregularities in the electoral process.