Sharif Hassan Sheikh Aden was sworn in Friday after winning the election with 217 votes out of 388 casts beating his closest competitor who got only 143.
The new speaker said he would try to unite parliament.
His predecessor, Sheikh Aden Mohamed Nur, resigned his post on May 17, a day after being heckled and shouted down by other lawmakers. Nur had strongly criticized Prime Minster Omar Abdirashid Sharmarke.
President Sheikh Sharif Sheikh Ahmed announced he was firing the prime minister the next day, but later reversed his decision.
Somalia's transitional government has been hampered by internal conflict as it tries to battle Islamist insurgent groups.
The government said early this year it would mount a major offensive against the rebels, but the operation never materialized.
The fragile government controls only a few small parts of the capital, Mogadishu, with the help of African Union peacekeepers.