British border agents and the Royal Marines have stopped millions of pounds worth of heroin trade across the western Indian Ocean, where the drug is being transported from Afghanistan to east Africa for eventual sale in Europe.

The international development secretary, Penny Mordaunt, said the anti-smuggling scheme in Tanzania, funded from the UK’s aid budget, was vital for development in the nation but would also protect the UK and Europe from the effects of organised crime.

Ministers hope that promoting schemes such as this one, at a time when the UK’s aid budget is under increasing scrutiny, will demonstrate that the funding has not only tangible effects in developing nations but also knock-on effects on organised crime in the UK.

“Combating organised crime and improving security is good for developing nations and directly contributes towards the security and safety of the UK,” Mordaunt said. “That double win is what we need from every pound we spend from the aid budget.”

Mordaunt, who visited Msasani Bay off Dar es Salaam this month, said the drug trade was undermining stability and holding back development in the region.

“This is a win for Tanzania as we tackle the drivers of instability and poverty which hold back development, but also a win for the UK as we are tackling criminal networks that work in both countries and stopping drugs and organised crime coming to our shores,” she said.

The Department for International Development estimates that 40% of the heroin being sent across the west Indian Ocean is destined for Tanzania, much of it transported in wooden dhows from the Pakistani coast.

The drugs are offloaded at sea on to smaller local Tanzanian vessels such as fishing boats and brought ashore on beaches along the coast. Since the scheme began, one of the largest hauls captured by Tanzanian officials aided by Britain’s National Crime Agency was 112kg of heroin.

The wholesale price of a kilogram of the drug is between £20,000 and £30,000, and street value can be at least double, meaning the amount seized could have been worth more than £5m.

Since the early 2000s there has been a significant rise in organised criminal groups smuggling Afghan heroin through ports along the Swahili coast from Pakistan and Iran.

Most of the drug ends up in Europe, though development officials says an increasing amount is sold directly on the streets of Dar Es Salaam and Zanzibar. Alongside illegal drugs, ships can also smuggle ivory and other illegal wildlife products through Tanzania from other countries in Africa to buyers in Asia.

The £1.3m UK programme funds British experts including from the Royal Marines, UK Border Force and the NCA to help Tanzanian and Kenyan authorities investigate organised crime.

Mordaunt said that as part of the scheme a British financial investigator and a criminal justice adviser were offering expertise to Tanzania’s corruption bureau on tracking down, prosecuting and seizing cash from drug smuggling operations.