Wrangling over the cabinet has prolonged a period of drift that donors say is hurting recovery efforts. After more than two decades of war and still battling an Islamist insurgency, Somalia remains dependent on Western and other donors.
Parliament had rejected Prime Minister Omar Abdirashid Ali Sharmarke's first choice of cabinet after lawmakers complained that 10 of the 25 ministers were from the previous government that had not delivered change fast enough.
The lawmakers also asked for amendments to Sharmarke's second list, submitted for review 10 days later.
Sharmarke, appointed in December, is the third premier in little more than a year, after his predecessor had a row with the president.
Western donors, frustrated by spats between President Hassan Sheikh Mohamud and his prime ministers, said the government is running out of time to put in place all the measures needed to hold presidential elections next year.
"The new cabinet now has little time left to deliver against the priorities that the Somali government set out in Vision 2016 and that formed the basis for international support," European Union envoys said in a joint statement.
The goal is to put a constitution to a referendum in March 2016 that will outline a new federal structure to help overcome the regional and clan rivalries that have fuelled past fighting. A vote for a new president is due to follow in September.
Speaker Mohamed Sheikh Osman Jawari said 191 out of the 213 lawmakers present in parliament voted to approve the cabinet, while 22 rejected it.