Insurgents in Somalia fired mortars at U.S. congressman Donald Payne as he departed Mogadishu Monday, following talks on the security situation in the country with Somalia's president.

Insurgents fired six mortar shells in the direction of Mogadishu's airport as Congressman Donald Payne left the city following a brief, one-day visit. None of the mortars reached the aircraft though at least three civilians were injured by a stray shell.

No group has so far claimed responsibility for the attack but Islamist insurgent groups, including al-Shabab and the Islamic Party, launch frequent mortar attacks on government soldiers and African Union peacekeepers in the capital. The insurgents have voiced loud opposition to American support for Somalia's weak but internationally-backed government.

Payne, a 74-year old Democratic Party congressman from New Jersey, chairs a congressional subcommittee on Africa. During his visit he met with President Sharif Sheikh Ahmed, as well as the prime minister and other cabinet members.

He hailed the progress made by the government, which took office in January after the current president, a moderate Islamist and a former insurgent leader, signed an agreement with the existing government.

"The United States is very interested in a stable Somalia. After 18 years we are optimistic that the government here in Somalia will become stronger and able to benefit its people," said Payne.

President Ahmed was the leader of the Islamic Courts Union that briefly took control of the country in 2006, before being ousted by Ethiopian troops backed by the United States. Since then, the Islamist movement has split, and President Ahmed's more moderate faction has gained the support of the international community.

"We realize that the government cannot do things overnight. After 18 years of no functioning government, it's going to take patience and time for the government to be able to start to provide services to its people," said Mr. Ahmed. "We are hopeful that the new Obama administration will have a positive policy towards the government of Somalia. However, the government will have a responsibility of proving that it is in the process of benefiting the people."

Payne said he visited Somalia several times during the 1990s. Senior American officials have avoided Mogadishu in recent years, as the security situation has deteriorated.

Payne's visit comes a day after U.S. Navy snipers killed three Somali pirates who were holding the American captain of a cargo ship hostage. After arriving in Kenya, the captain urged the United States to take action against piracy in the area.