Media playback is unsupported on your device Media caption David Cameron: "Ed Miliband will not rule out a deal with the SNP"

David Cameron has called on Labour's Ed Miliband to rule out a post-election deal between Labour and the SNP in the event of a hung Parliament.

The PM said such a pact would be the "worst outcome" of May's election.

The SNP, which campaigned for Scottish independence in the referendum, wanted to "break up our country", he said.

Earlier, ex-Tory chairman Lord Baker said a Tory-Labour coalition could be needed after the election to keep the SNP from holding the balance of power.

Opinion polls have suggested that the election could result in a hung parliament with no single party winning an overall majority, leading to speculation about possible coalitions, while polls in Scotland suggest the SNP could take almost all of Labour's 41 seats.

Speaking at an event to mark two months until polling day, Mr Cameron said: "If you thought the worst outcome in this election is a Labour government led by Ed Miliband, think again.

"You could end up with a Labour government led by Ed Miliband, propped up by Alex Salmond and the Scottish National Party.

Media playback is unsupported on your device Media caption Lord Baker of Dorking says there is a "great threat" the UK could be broken up

"You could end up with an alliance between the people who want to bankrupt Britain and the people who want to break up Britain.

"Even today, Ed Miliband will not rule out a deal or backing from the SNP. If he cares about this country, he should do so."

Analysis : Ben Wright, BBC political correspondent

There is one pre-polling day question political parties consistently dodge. And that is this: who would you do a deal with if there's a hung parliament?

And you can understand why. Who knows how parliament will look after Election Day and how a working majority might be formed? The big parties want to keep their options open.

But the surge in support for the Scottish Nationalists is dominating Labour and Tory tactics, two months before an election that currently looks like a dead heat.

There is huge Conservative pressure on Ed Miliband to rule out a deal of some sorts with the SNP - and that's infuriating the Labour leadership.

They see it as a blatant attempt to suppress Labour's vote in Scotland and rally the Tory vote in England - by talking up the prospect of a Labour / SNP alliance.

However, some Scottish Labour MPs would also like their leader to rule out an SNP pact to jolt wavering voters into sticking with Labour.

Labour's message to voters in Scotland is if they vote SNP they increase the chance of a Conservative government.

For their part the SNP say they will never make a deal with Conservatives and they won't join a formal coalition with Labour.

This head-scrambling, tactical tangle is all because the final result is so uncertain. But what's clear is that the battle for power at Westminster, the route to Number 10, may well hinge on what happens in Scotland.

Mr Miliband told party members in Edinburgh that if the Scottish electorate voted SNP they risked handing power to the Tories, as "every one less Labour MP" made it more likely the Conservatives would be the largest part..

He did not address what might happen in the event of a hung parliament after the election in 60 days' time, although he earlier told the Daily Record that a coalition deal with the SNP was "not on the agenda".

And on Friday he said a coalition with the Conservatives was "not going to happen".

"We are working for a majority Labour government," he said. "I think we will leave those kind of grand coalitions to other countries."

The former chairman of the Conservative party, Lord Baker of Dorking, had earlier said a Labour minority government reliant on the SNP in votes on critical issues would be a "nightmare" situation at Westminster.

Image copyright PA Image caption The SNP has ruled out going into partnership with the Conservatives

Lord Baker said the SNP could then demand in return "even more levels of devolution".

"That would lead more to the break-up of the United Kingdom. I think it would be a considerable threat."

There could be a joint government of the Labour and Conservative parties instead, he said, in order to preserve the unity of the UK.

The peer's words echo former Prime Minister Sir John Major's warning that the SNP would enter any deal with Labour with the "overriding aim" of "prising apart" the union.

SNP leader Nicola Sturgeon has ruled out supporting a Conservative government and said it was "unlikely" the SNP would enter a formal coalition with Labour should there be a hung parliament.

However, she has indicated her MPs could work with Labour on an "issue-by-issue basis".

Media playback is unsupported on your device Media caption Ed Miliband wants voters to "give David Cameron his marching orders"

Scottish Labour leader Jim Murphy has dismissed the idea of a grand coalition with the Tories as "ludicrous" and a "no-brainer".

Mr Murphy told BBC Scotland he was "absolutely" ruling out Lord Baker's idea, adding: "I don't need lessons from Tory dinosaurs about how to run Scotland."

The former leader of the SNP, Alex Salmond, has said a coalition with Labour was "unlikely" but could not be ruled out.

"You could have a confidence and supply arrangement where for certain key requirements you give support over a period of time, or you could do things on a vote-by-vote basis," he said.

Mr Salmond is standing for the SNP in the Gordon constituency in Aberdeenshire in the election.