The world’s two largest technology manufacturers have signed an agreement to buy 10m doses of BioNTech’s Covid-19 vaccine to donate to Taiwan, resolving an almost yearlong political tug of war over securing jabs for the country.

TSMC, the world’s largest contract chipmaker, and Foxconn, the leading manufacturer of Apple’s iPhone, said they had agreed the $350m deal with Chinese conglomerate Fosun, which controls BioNTech’s distribution rights for greater China.

The two technology companies stepped in because the sovereignty dispute over Taiwan had prevented Taipei from purchasing the jabs from BioNTech.

China claims Taiwan as part of its territory and frequently tries to force third countries and companies to treat it as if it were ruled by Beijing.

Taipei had tried since August last year to hammer out a deal with the German biotech company. But an initial contract signed in January was derailed after BioNTech demanded changes to the language describing Taiwan in a public announcement, according to Taiwan’s health minister. Beijing has also protested against vaccine donations to Taiwan by the US and Japan as “interference”.

The Chinese government and Fosun claimed that they were happy to provide vaccines to Taiwan, but the Chinese company did not apply to the country’s Food and Drug Administration to distribute the BioNTech jab in Taiwan — a step required for any drug importer or distributor. Local officials said Beijing refused to deal with Taiwan’s government.

The deadlock, which persisted as deliveries to Taiwan of other vaccine orders from AstraZeneca and Moderna were delayed because of global shortages, piled pressure on the government after the island suffered its first significant outbreak since mid-May.

The deal with TSMC and Foxconn helped circumvent the political impasse. On Sunday, Fosun said in a statement that the jabs destined for Taiwan would be sold through its Hong Kong unit and a Taiwanese medical company to TSMC and Yongling Foundation, the charity organisation of Foxconn founder Terry Gou.

In statements filed to the Taiwan Stock Exchange on Monday, TSMC and Hon Hai Precision Industry, Foxconn’s flagship company, said their respective procurements were worth up to $175m each and that the vaccines would be donated to the Taiwanese health ministry.