Updated

Somalia's government on Saturday blamed the Saudi-led coalition for Friday's attack on a boat that killed at least 42 Somali refugees, calling the assault by a military vessel and a helicopter gunship "horrific."

Somalia urged the U.S.-supported coalition to investigate. The boat packed with dozens of refugees was more than 30 miles off war-torn Yemen's coast when it came under attack. Some of the passengers were women and children.

"What happened there was a horrific and terrible problem inflicted on innocent Somali people. The Saudi-led coalition fighting in Yemen is responsible for it," Somalia's foreign minister, Abdisalam Omer, said on state-run radio.

Somali Prime Minister Hassan Ali Khaire in a separate statement called the attack "atrocious" and "appalling."

Yemen's Shiite rebels also have blamed the Saudi-led coalition. There has been no coalition comment.

The attack highlighted the perils of a heavily used migration route running from the Horn of Africa to the oil-rich Gulf, right through Yemen's civil war.

A Yemeni trafficker who survived said the refugees had been trying to reach Sudan.

The attack comes shortly after Somalia's recently elected president, the Somali-American Mohamed Abdullahi Mohamed, chose to make Saudi Arabia his first official foreign visit overseas.

The Saudi-led coalition began striking Yemen's Houthi rebels and their allies in March 2015, hoping to drive the rebels from the capital, Sanaa, and restore the internationally recognized government. The rebels remain in control of Sanaa and much of northern Yemen, and the conflict, which has killed an estimated 10,000 civilians, is in a stalemate.

Since the beginning of the air campaign, Yemen has been under an air and sea embargo. The coalition is the only party to the conflict with naval and air forces, and rights groups have documented hundreds of airstrikes in which civilians have been killed.

Despite the fighting, African migrants continue to arrive in the war-torn country, where there is no central authority to prevent them from traveling onward to a better life in neighboring oil-rich Saudi Arabia.

More than 111,500 migrants landed on Yemen's shores last year, up from around 100,000 the year before, according to the Regional Mixed Migration Secretariat, a grouping of international agencies that monitors migration in the area.

The turmoil has left migrants vulnerable to abuse at the hands of the armed trafficking rings, many of which are believed to be connected to the multiple armed groups involved in the war.