Image caption David Cameron's promise not to raise income tax rates is legally binding until 2020

David Cameron's promise of a law against increasing income tax until 2020 was devised "on the hoof", one of his advisers at the time has revealed.

Ameet Gill, who ran Downing Street events planning for the former prime minister, called it "probably the dumbest economic policy" possible.

The measure is now law and also applies to VAT and national insurance.

At the time Labour described it as a "last-minute gimmick", saying it would make it harder to tackle the deficit.

But before the election, Mr Cameron said: "I have seen the books. I know what needs to be done." Working people had "paid enough tax" and should "be able to keep more of the money to spend as you choose," he added.

With the government's so-called "five-year tax lock" in place, the basic rate of income tax - subject to variations in people's personal allowances - will remain at 20% until after the next general election, scheduled for May 2020. And the rate stays at 40% for earnings between £43,001 and £150,000 and 45% for earnings above that.

National Insurance and VAT rates are also not allowed to rise until 2020.

'Cooked it up'

Mr Gill, who was Mr Cameron's head of strategic communications in charge of the "Grid" outlining Downing Street's planning agenda from 2011 to 2015, told BBC Radio 4's Week in Westminster: "Sometimes when a vacuum is there, it makes the government do some stupid things.

"When I was in government, we made some announcements on the hoof just to fill that vacuum."

He added: "Towards the end of the general election campaign in 2015, we did the five-year tax lock. It's when we committed to put in legislation that we would not increase taxes.

"It was probably the dumbest economic policy that anyone could make, but we kind of cooked it up on the hoof a couple of days before, because we had a hole in the grid and we needed to fill it."

In its 2015 general election manifesto, launched on 14 April of that year, the Conservative Party promised "no increases in VAT, income tax or national insurance".

Two weeks later, Mr Cameron added to this when he gave a speech promising to create a law preventing ministers from going back on this pledge.

The tax lock is now law until 2020, when the next election is scheduled to happen, unless Parliament votes to overturn it.

For Labour, then shadow chancellor Ed Balls said before the last election that he doubted the Conservatives could meet their target of balancing the government's books by 2020 - and that the tax lock would make this more difficult.

Chancellor Philip Hammond has since dropped the deficit target, arguing it will be tackled "in due course".

Week in Westminster is on BBC Radio 4 from 11:00 BST and is available after broadcast on the BBC iPlayer and the programme's own website.