Ed Miliband has accused David Cameron of acting as a cheerleader for the US pharmaceutical firm Pfizer's proposed takeover of its British rival AstraZeneca as he called for the brakes to be put on the biggest takeover in UK corporate history.

The Labour leader, who said Pfizer had a "pretty dubious record" on takeovers, has written to the prime minister calling for a change in the law to ensure that a public interest test on such corporate deals should be applied to strategic economic interests. The public interest test normally applies to defence companies or utilities.

Miliband has decided to intervene after Pfizer offered what he described as "pretty weak assurances" to protect AstraZeneca's research and development base.

He told the Andrew Marr Show on BBC1: "David Cameron is in totally the wrong place on this issue. He has become a cheerleader for Pfizer's takeover when instead he should be championing the long-term agenda for high-quality jobs in this country which AstraZeneca provides."

Miliband added: "The prime minister, rather than being that cheerleader for this takeover with paper-thin assurances, should be actually championing British jobs and a British success story that is AstraZeneca – investing in research and development, a crucial part of our science base."

The Labour leader called for a widening of the current public interest test to protect a company that is vital to the British national interest. He said there should be an independent assessment of the impact of the Pfizer bid on the long-term science and industrial base of Britain, after warnings from senior figures such as Lord Sainsbury and Lord Heseltine about the dangers of the bid.

Miliband said: "No other country in the world would be waving this bid through, nodding it through, on the basis of pretty weak assurances from Pfizer who have a pretty dubious record in this country and other takeovers."

Miliband wrote to the prime minister after Pfizer offered assurances that 20% of AstraZeneca's research and development workforce would remain in the UK. Ian Read, Pfizer's Scottish-born chief executive, wrote to the prime minister to say that it would complete a "substantial" R&D facility at Cambridge.

The prime minister welcomed the Pfizer assurances on Friday as "robust". Hours earlier, AstraZeneca rejected a second bid by the US firm valuing the British company at £63bn.

Miliband believes the Tories are on weak ground on the Pfizer takeover. He believes they initially saw the takeover as a chance to show that Britain offers highly competitive corporate tax rates. But when the likes of Heseltine issued warnings about a threat to a major part of Britain's science base they changed tack and sought assurances from Pfizer.

A No 10 spokesman said: "The government isn't cheerleading for Pfizer. It is fighting for British jobs and British science. By suggesting otherwise, Ed Miliband is putting politics before the national interest and undermining that position. We engaged early with both companies precisely to avoid previous governments' failures in these types of situation."

Sources said the prime minister had made clear on Friday that the government was neutral on the proposed deal.