Three Britons accused of smuggling more than £2m into Somalia to secure the release of two hijacked ships have been jailed for between 10 and 15 years and fined thousands of pounds.

Matthew Brown, a pilot, and Andrew Oaks and Alex James from Nairobi-based security firm Salama Fikira, were among six foreigners arrested after landing in two unmarked planes at Mogadishu airport last month. It is understood the men were accused of bringing cash into the country to secure the release of two ships being held ransom by Somali pirates. Both ships have since been freed.

Two of the Britons who were accused of carrying the cash were sentenced to 15 years, while the third was ordered to serve 10 years in prison. They are being held in Mogadishu along with an American and two Kenyans who were given 10-year prison terms for their roles.

According to a source in Somalia, the group was arrested by local police and secret service agents last month shortly after flying into the capital's airport with around £2.2m in cash.

A Somali official has said the planes they used were frequently employed by companies delivering ransoms. But it is the first time westerners have been arrested and sentenced for involvement in ransom payments to pirates.

Officials did not give further details, but a source said the men are unlikely to have to serve their full sentences and discussions are under way to reduce or overturn the penalties.

Asked about possible pardons or parole, a spokesman for the Somali information ministry, Abdifitah Abdinur, said: "Everything is possible and I can't comment on the future."

A Foreign Office spokesman said that it was aware of the verdict.

"We have impressed upon the transitional federal government to ensure the safety and security of the group while legal options are considered," said a spokesman. "We are in touch with the families and are providing consular assistance."

A spokesman for Salama Fikira, which is run by former British special forces officers, declined to comment.

Piracy in the busy shipping lanes off Somalia has flourished since the country's government collapsed in 1991, and the illegal industry has evolved into a multimillion-dollar business with almost daily attacks. Ransom money is often dropped from aircraft on to hijacked ships, with the average payout around £3m.

According to figures from the International Maritime Bureau, pirates took a record 1,181 hostages in 2010, seizing 53 ships, all but four taken by Somali pirates. "More people were taken hostage at sea in 2010 than in any year since records began," the organisation's annual report said.

In February, four Americans who had been taken from their yacht in the Indian Ocean were shot dead during a botched rescue operation by US naval forces. Two pirates were killed and 15 detained during the incident.

The most high-profile British victims of Somali piracy were Paul and Rachel Chandler, whose yacht was hijacked in October 2009. They spent more than a year in captivity before being released late last year, allegedly after a ransom of around £500,000 was paid.

The British couple were held hostage for 388 days. But despite being dismissive of the Foreign Office's efforts to free them, they are largely untroubled by their ordeal – and looking forward to setting sail again