Lib Dem leader says he was in favour of a faster programme of deficit reduction before the general election – even though he did not publicly back the idea

Nick Clegg, the Liberal Democrat leader and deputy prime minister, has admitted that he changed his mind about the timing of spending cuts prior to the general election, despite publicly telling the electorate weeks before the poll that early deep cuts would be "economic masochism".

In what was seen as the biggest policy reversal of the coalition negotiations, the Lib Dems abandoned their policy of maintaining the government's economic stimulus through this financial year and backed a tougher Tory plan instead.

Clegg cited calls with Mervyn King, the Bank of England governor, as critical to this decision to back the package of cuts announced by the coalition government after taking office.

In an Observer interview on 6 June, Clegg described his conversation with King on 15 May. "He couldn't have been more emphatic. He said, 'If you don't do this, then because of the deterioration of market conditions it will be even more painful to do it later.'"

But Clegg has now admitted that he had changed his views on the timing of cuts before the general election had even taken place.

The revelations are made in a BBC2 documentary Five Days that changed Britain, broadcast tonight, which outlines the dramatic five days following the inconclusive result of the 6 May general election and the frenzied negotiations over the formation of a new government.

Asked by BBC political editor, Nick Robinson, if he had changed his mind about cuts this year during the five days of negotiations, Clegg said: "I changed my mind earlier than that ... firstly remember between March and the actual general election ... a financial earthquake occurred in on our European doorstep."

Pressed on why he failed to convey this to the electorate prior to them casting their votes, Clegg said: "... to be fair we were all ... reacting to very, very fast-moving economic events."

The deputy premier's admission dovetails with comments made by King yesterday to the Treasury select committee, in which he told MPs that he gave no fresh information to Clegg in a call on 15 May that could have led to him to call for a faster deficit reduction programme than the one outlined by his party during the election campaign.

He said he spoke to Clegg at the request of the new government, five days after the Lib Dem leader announced he was forming a coalition government with David Cameron in which a faster programme of deficit reduction was agreed.

Tonight's programme also reveals details of the behind-the-scenes manoeuvres after the general election results were announced on Friday.

This includes Cameron's admission that he was resigned to carrying on as leader of the opposition just 24 hours before he walked into Downing Street.

He told his wife, Samantha, that he was "depressed" that he had not led the Conservatives to a general election victory.

Cameron tells the programme: "I remember going home I think on Monday evening and I think Sam and I had supper in the kitchen and I remember saying you know it's not going to happen, I'm going to be leader of the opposition and I remember saying I want to go on being leader of the opposition."

The programme also reveals how Gus O'Donnell, the head of the civil service, urged Cameron and Clegg to hurry up and form government to avoid a bad reaction from the markets.

O'Donnell tells the programme he advised Conservative and Liberal Democrat negotiators in their first meeting with the cabinet office that "the more comprehensive the agreement" between the two parties, the more it would reassure the markets.

The Conservatives and Liberal Democrats finally sealed the deal on 11 May – four days after the election results – and published an initial coalition document outlining the agreement on key areas of policy differences.

This included a referendum on switching the voting system to AV – a key Lib Dem demand.

But tonight's programme suggests that Clegg may have bluffed Cameron into offering the Lib Dems a referendum on a change to the voting system as part of the coalition talks.

Rumours have frequently circulated in Tory circles that Clegg, in highly pressurised coalition talks after the election, managed to outmanoeuvre the Tory party leader by intimating he had been offered more by Labour in parallel post-election talks than was actually the case.

Cameron was asked by Robinson whether he misled his MPs by saying Labour would give the Lib Dems voting reform without a referendum. Cameron said no, because he was "absolutely certain" that the case.

Clegg is then asked whether it is inaccurate to say he told Cameron he could get the alternative vote without a referendum from Labour.

He said: "The perception, which I think was accurate, was discussions are out, and it might have been an offer that might had been made and might have been considered. In answer to your direct question – was it ever formally made to me? – no, it wasn't formally made to me."

Tonight's programme also reveals that Cameron had 45-minute chance encounter with Clegg before the election, which helped him to form a view of the man who would later become his deputy prime minister.

"We'd spoken, funnily enough I think by accident when the government opened the supreme court. I think because the prime minister, then Gordon Brown, and the Queen were both there they didn't really know what to do with the opposition politicians they left Nick and me alone in this room together for about 45 minutes. We didn't talk about ... hung parliaments or anything like that; we just talked about politics and things, and I think that helped, so I knew that he was a reasonable person – in politics for the right reasons like me."

The programme will be broadcast tonight on BBC2 at 9pm.