"The United States strongly condemns today's Al-Shebab attack on the Somali parliament," said the US State Department's deputy spokeswoman Marie Harf.
"We continue to stand firmly with the federal government of Somalia and the many international partners working to support its efforts to root out the threat posed by Al-Shebab, and to build a more secure and prosperous future for the Somali people," Harf said in a statement.
"Cowardly acts such as these will not shake our resolve."
The attack occurred when rebels set off a car bomb and stormed the building wearing suicide vests. It took Somali security forces and African Union troops more than four hours to end it.
Harf said US officials "extend our sympathies and condolences to those affected by this heinous act of terrorism, and commend Somali and African Union forces for their swift and courageous response.