Media playback is unsupported on your device Media caption David Cameron: "Our plan is about fixing the roof when the sun is shining"

David Cameron has sought to draw the economic battle lines with Labour ahead of May's general election, accusing Ed Miliband of a "massive gamble".

He said Conservative plans to eliminate the total budget deficit by 2018-9 were "responsible".

Labour says Mr Cameron has borrowed billions more than planned since 2010.

The government also set out its Charter for Budget Responsibility, prompting a row between the two main parties over their deficit-cutting timetables.

Under the terms of the updated charter, the Conservatives and their Lib Dem partners would commit to get debt falling as a share of national output by 2016/17 and would also seek to get the structural current budget in balance by 2017/18.

The Labour Party said it would support the measure in a Commons vote, calling it a "silly political stunt", and both sides accused each other of shifting their deficit reduction targets.

BBC assistant political editor Norman Smith said: "The details of this latest timetable for paying off the deficit may elude most voters, but what is clear is that both main parties know that destroying the other's credibility on the deficit is key to winning the argument on the economy."

Analysis

Robert Peston, economics editor

In announcing new targets for reducing the deficit and debt as a share of national income in the next Parliament, have the Tories and Liberal Democrats put Labour on the spot or done the main opposition party a favour?

What they are proposing - and Parliament will vote on next year - is that the cyclically adjusted current budget should be in balance by 2017/18 and debt as share of GDP should be falling by 2016/17.

Read more from Robert

Speaking in Poole, just days after Mr Miliband made a major speech on the deficit, Mr Cameron urged people to let his party "finish the job" on the economy and suggested Labour posed a major risk to the UK's recovery.

He restated the Conservatives' plan to return the UK's finances to the black by 2018/19, by securing a surplus on the overall budget, and said Labour was only committed to eliminating the current deficit during the next Parliament.

'Hugely risky'

As a result, he claimed, the UK's debts would continue to rise and the UK would be unprepared for a "rainy day".

The Conservatives have said a future Tory-majority government would also aim to get an overall budget surplus by 2018/19.

The prime minister defended his Chancellor George Osborne against charges that he was being "ideological" in his plans to cut the deficit by reducing future spending.

Image copyright Getty Images Image caption Mr Miliband has accused the Conservatives of making £7bn of unfunded tax cuts

While cutting spending by £30bn in the first years of the Parliament would not be easy, he said he was "confident" it could be done.

The Conservatives' plans were "reasonable, responsible and sensible" and he expressed his hope that "the British people will stick with them when the time comes".

Last week, Labour leader Ed Miliband promised that if his party won the next election, public sector debt as a share of national income would be falling by 2020 and that, by that date, the government would no longer be borrowing to finance current spending - day-to-day expenses such as civil service salaries and welfare payments.

But Mr Cameron said that this would not include capital spending, such as investment in infrastructure.

And he added: "So Ed Miliband is saying he will only balance part of the government's budget - not the whole thing like we plan. And let's be clear what that means.

"Ed Miliband would never clear the overall, headline budget deficit. He would run a budget deficit - permanently adding to debt - indefinitely. Every year. Forever. "

'Essential test'

He claimed that Labour's plans could add almost £500bn to the national debt over 21 years: "That is a great, black, ominous cloud on the horizon - and if a real economic storm hit again, the fall-out would be felt by families up and down this country."

He said the Conservatives would "fix the roof when the sun is shining" while the alternative was "taking a massive gamble with our future".

Shadow chancellor Ed Balls said the proposed charter was consistent with Labour's plans.

He said: "In the Budget George Osborne talked about a vote on balancing the overall budget. Today he and David Cameron have done a staggering U-turn on this vote and are now proposing a vote on the current budget, excluding capital investment.

"This is the same measure of the deficit the Labour Party has been committed to targeting for the last three years."

Last week, Mr Miliband addressed the issue of the deficit in a speech and said dealing with the public finances would be an "essential test" of Labour's credibility.

He argued boosting wages and taxing the better off, in addition to budget cuts in most areas, could contribute to eliminating the deficit by 2020. And he said a Labour government would cut the deficit every year of the next parliament.

Coalition differences

He said that none of Labour's pre-election spending commitments would be funded by extra borrowing, and accused the Conservatives of making £7bn worth of unfunded tax cuts.

Mr Osborne has said he believes he can balance the books without any tax rises and has rejected suggestions it will entail "colossal" cuts to public expenditure.

But on Sunday, his Liberal Democrat cabinet colleague, Business Secretary Vince Cable, told the BBC he would "really worry" if George Osborne's plans were realised as they would "destroy public services in the way that we know them".

Image caption Mr Cable claims the Conservatives are pursuing an " ideologically driven" approach to deficit reduction

In last week's Autumn Statement, the Office for Budget Responsibility raised its borrowing forecast for the current financial year from £86.6bn to £91.3bn but said this would still be below last year's total of £97.5bn.

Borrowing levels are forecast to fall every year until 2018-9, although Labour say the government has long abandoned its original 2010 target of eliminating the deficit by the time of next year's election.

In his speech, Mr Cameron also revealed further details of a scheme offering 100,000 first-time buyers the chance to buy a newly built home with a 20% discount.

The government says changes to the planning system will allow them to free up some "brownfield" sites from planning costs, allowing the homes built there to be sold more cheaply.