Ed Miliband will claim that David Cameron’s “small-minded isolationism” has sharply reduced Britain’s influence in the world, and will hold the Prime Minister partly responsible for this week’s deaths of migrants in the Mediterranean.

In a rare speech on foreign affairs, the Labour leader will try to reassure critics who doubt his credentials as prime minister by saying his first responsibility would be “to keep our country safe and secure.” He will contrast the Conservatives’ “pessimistic isolationism” with Labour’s “genuine and hard-headed multilateralism.”

Addressing the Chatham House think tank in London, Mr Miliband will argue that this week’s tragic scenes in the Mediterranean stem from the failure of post-conflict planning in Libya after Britain played a key role in toppling Colonel Muammar Gaddafi. “David Cameron was wrong to assume that Libya’s political culture and institutions could be left to evolve and transform on their own,” he will say.

On 23 April Mr Cameron discussed the migrants crisis with fellow EU leaders in Brussels. They were expected to agree new measures aimed at preventing the deaths of more people making the perilous journey across the Mediterranean from Libya and other African countries.

Miliband rarely makes speeches on foreign policy (Getty Images)

In his hard-hitting attack, Mr Miliband will claim: “David Cameron has presided over the biggest loss of influence for our country in a generation. And that has happened because the government he led has stepped away from the world, rather than confidently towards it, side-lined in crucial international events time after time under this government, just at the moment when we needed to engage.

“It is time to reject the small-minded isolationism that has characterised this government, diminished the office of prime minister and shrunk the influence of Britain. Because this Government’s approach has and weakened Britain at a time when the challenges are perhaps greater and more complex than at any time since the Second World War.”

He will claim that Mr Cameron’s inward-looking approach has left Britain on the sidelines over Russia’s aggression in Ukraine.

Mr Miliband has faced criticism for saying little about foreign policy since becoming Labour leader and the issue has had a low profile in the election campaign so far. The Conservatives have accused him of rewriting history over the Commons defeat he inflicted on Mr Cameron in 2013, which scuppered military action against Syria’s President Bashar Assad after he used chemical weapons against his own people. Mr Miliband has portrayed it as a bold stance, but the Tories say he was trying to prevent a Labour split.

Election Analysis: The Key Voters Show all 6 1 /6 Election Analysis: The Key Voters Election Analysis: The Key Voters Settled Silvers These are the comfortably-off over-60s, still in work or drawing a decent pension – or both – who are enjoying their entitlements such as the Winter Fuel Allowance, free bus passes and free TV licence. They are worried about immigration and Europe. Both the Conservatives – who are pledging to keep benefits for wealthier pensioners – and Ukip want their votes Micha Theiner Election Analysis: The Key Voters Squeezed Semis Slightly older than the Harassed Hipsters, they are the second key group for Labour’s family-focused election strategy. They are married couples on low to middle incomes who own unpretentious semi-detached homes in suburban areas. In 2001, these were the Pebbledash People sought by the Conservatives. Now the pebbledash is gone and a modest conservatory has been built at the back Micha Theiner Election Analysis: The Key Voters Aldi Woman In 1997 and 2001 she was Worcester Woman – a middle-class Middle Englander shopping at Marks & Spencer and Waitrose. Today, the age of austerity means she still goes to Waitrose for her basic food shop but cannily switches to Aldi for her luxury bargains such as Parma ham and prosecco. Identified by Caroline Flint, she is a key target of both Labour and the Conservatives Micha Theiner Election Analysis: The Key Voters Glass Ceiling Woman In her thirties or forties, she has an established career under her belt, perhaps in the “marzipan layer” – one position below the still male-dominated senior executive level. She is now, according to Nick Clegg, forced into making the “heart-breaking choice” between staying at home to bring up her children and going to work and forking out for high-cost, round-the-clock childcare Election Analysis: The Key Voters Harassed Hipsters One of the two key groups identified by Labour as crucial to hand Ed Miliband the keys to Downing Street. Well-paid professional couples, often with children, they live in diverse urban and metropolitan areas rather than the suburbs. More comfortably off than most swing voters, they are time poor – struggling to balance raising a young family with busy work schedules Micha Theiner Election Analysis: The Key Voters Neo-Greens These are mainly first-time voters, though some are in their twenties – students and digital-age generation renters helping to fuel the “Green Surge”. Idealists, but with no tribal loyalty to any party, they are anti-austerity, middle class, living in urban areas. Despite studying at university or recently graduated, they are struggling to find decent jobs and want cheaper housing and a higher minimum wage Micha Theiner

Mr Miliband will promise never to forget the “vital lessons” of Tony Blair’s backing for the US-led invasion of Iraq in 2003 when making judgements on military intervention. But he will try to move on from Labour’s long debate on the Iraq war, saying that military action alone will not defeat the “barbarism” of Isis – the “most pressing” challenge -- and calling for a long-term, multinational political strategy to tackle extremism.

Mr Miliband will pledge to restore Britain’s commitment to international bodies including the UN, NATO, the Commonwealth and the EU. He will argue that pressure from a divided Tory party and Ukip has pushed Mr Cameron to the edge of EU exit and an historic betrayal of the national interest.

“David Cameron has done so not because of any great political principle or ideal. Deep down he doesn’t really believe we would be better off out of Europe,” he will say. “He has taken us to the edge of European exit because he has been too weak to control his own party and too anxious about the rise of Ukip, a rise he could and should have challenged, but pandered to instead.”

Mr Miliband will say: “We will rebuild our influence and that starts with the EU. We will never put our national interest at risk by threatening to leave.”

Meanwhile, Labour has fallen below 30 per cent in a mainstream opinion poll for the first time in the General Election campaign. The Survation poll for the Daily Mirror put the party on 29 per cent - down four points compared to a similar poll released on 17 April.