Officials in Somalia say three British nationals, an American and two Kenyans have been sentenced to at least 10 years in prison for bringing millions of dollars in cash into the country.

Somali Information Ministry spokesman Abdifitah Abdinur says two of the defendants were sentenced to 15 years in prison. The other defendants were sentenced to 10 years.

The men were arrested in Mogadishu last month after their planes were found to be carrying millions of dollars in cash. A Somali official previously said the planes are used by companies that frequently deliver ransoms to pirates.

The average ransom paid to pirates has reached nearly $5 million. The ransoms are often air-dropped down to the hijacked ships.