The Prime Minister's decision to step down is "truly shocking" and a "sad day for the country", ministers have said.

David Cameron's Cabinet colleagues said they had hoped he would stay on to steer Britain through its renegotiations with the EU.

Speaking on the BBC Radio 4 Today programme, Northern Ireland Secretary Theresa Villiers said: "It's truly shocking news, I think it's deeply saddening.

Read more: David Cameron resigns as Prime Minister following Brexit

"As I was just saying only a few minutes ago, I would very much have preferred David Cameron to be steering this country through the next few years.

"I entirely respect his decision but I think it is a sad day for the country that he has decided to stand down."

Her sentiments were echoed by Defence Secretary Michael Fallon, who said the PM believed he was doing the "honourable thing" after the referendum vote.

Read more: Labour MP - Jeremy Corbyn should resign over Brexit vote

He told the Today programme: "Well of course it is extremely sad news. I would have preferred him to have stayed on and to have helped make this decision work, but it's his decision.

"I think he feels it is the honourable thing to do, the decent thing to do - he lost the argument in the referendum campaign."

Asked who he thought might replace the PM and lead the renegotiations, he said: "That is matter now for the party to elect a new prime minister to be in place for the autumn and to take that forward.

"I think it is a bit too early to start speculating about that, and there is plenty to do now to help make this decision work, to stabilise our economy, to reassure our allies and to continue the programme we were all elected on last year."

Read more: JK Rowling - Scotland will see independence after Brexit

Mr Fallon added: "Now we must all pull together and make it work, and there is a huge job to be done not simply pulling the party together but pulling the country together."

Assessing Mr Cameron's legacy, he said: "He had said he was going to serve the full term of the Parliament so we expected him to be around for the next three years, he has been Prime Minister for six years, I think he will go down in history as one of the great reforming prime ministers, he's done a huge amount to take this country forward, as he described in his statement."

Alex Salmond, who stood down as Scotland's first minister after failing to secure independence in a referendum vote in 2014, said the PM's resignation was "inevitable".

He told the Today programme: "I, unlike some others, have been in this position of being the first minister of Scotland who organised the referendum, took my case to the people and lost.

"And you couldn't possibly continue in office under these circumstances. I never had a sliver of doubt that a Brexit would be followed very swiftly by the Prime Minister's resignation.

"And incidentally, the Chancellor, and many other members of the Government, who similarly are faced with the position of having no credibility whatsoever.

"If you take your case to the country on a constitutional issue and you lose, then there is only one course to take and that is to resign and allow those who sought a mandate and won, which they can see from the people of England, to go forward and take forward that mandate. That's the only thing you can do."

Tim Farron, leader of the Liberal Democrats, said the vote for Brexit would be the PM's legacy.

He said Mr Cameron had "no choice" but to resign and that Tory in-fighting over Europe had forced the country "over the edge".

He said: "Twelve months ago David Cameron had the best result of his career. Today, the worst.

"I was honoured to share a platform with the Prime Minster on this campaign, but this result, this self-inflicted wound, will be his legacy.

"There have been many things I did not agree with the Prime Minister on, but I must thank him for his stewardship of the country and for the way he took the very bold decision to create a coalition government in 2010. It was an incredible act of bi-partisan co-operation.

"The result of the referendum has left him with no choice."

Mr Farron said the Government's priority must be to "steady the economy" and reassure the markets.

He added: "There is no doubt this is going to be an incredibly testing, difficult and fractious time.

"David Cameron has become the latest Conservative leader to fall victim to his party's dangerous obsession with Europe. The Conservatives' political manoeuvring has taken our country to the brink, and today we have toppled over the edge."

Reacting to the news of the PM's resignation on Twitter, Alan Duncan, Conservative MP for Rutland and Melton, wrote: "David Cameron resuscitated the Conservative Party. Leavers will have to be very careful not to kill it off again."

Scottish Secretary David Mundell said: "David Cameron has been a great leader of my party and of our country. I was proud to be one of his first supporters during the 2005 leadership election and I have never regretted that decision for a moment. His achievements in rescuing our economy and in social reform will stand the test of time.

"Today he has once again put country before self."

Green Party leader Natalie Bennett said: "It is right that David Cameron has announced his resignation this morning. The UK requires fresh leadership after a bitter, divisive campaign.

"We must all work to bring communities that have been driven apart back together. That healing process begins this morning.

"But it is important that the coming days are not dominated by Conservative manoeuvring at the expense of broader, wider and more long-term debates about Britain's future."

Former Labour minister and European Commissioner for Trade, Peter Mandelson told the BBC Radio 4 Today Programme Mr Cameron's resignation spelled the end of attempts to modernise and make the party "less nasty".

Describing how he felt as the PM delivered his speech outside No 10, he said: "I felt very sad actually because as a fellow practitioner of politics and somebody who, as I did, played a role in taking the Labour Party to the centre I stepped back and watched him and George Osborne try to do exactly the same - to make the Tory Party a less nasty party, a more socially tolerant and inclusive party, and also of course a pro-European Party.

"But those who never wanted to go on that journey have finally got the upper hand, they've defeated him and now they can take the Conservative Party more in their own closed and right wing direction.

"And I think that is not what the country needs and I think it is a shame, both for Mr Cameron and for Mr Osborne, who initially, frankly, did so well in what they were trying to pull off."

He said the Chancellor's position had "been affected" by the tumultuous events, but said it is "not for me to say" if his political career is over.