Boris Johnson has quit as Tory leader after admitting he failed to persuade Cabinet colleagues that he could fight on.
The Prime Minister said it was "eccentric" to change governments at this stage but "I regret not to have been successful in those arguments".
A new Tory leader will now be elected who will replace Mr Johnson in No 10.
- Troop numbers are kept under constant review, Prime Minister says
- PM commits to raising UK defence spending to 2.5% of GDP by end of decade
- £24bn pledged for defence is 'gone' and didn't 'hit the sides', PM told
"In politics, no-one is remotely indispensable," he acknowledged in a statement delivered from a lectern in Downing Street.
Watch: Troop numbers are kept under 'constant review', says Prime Minister.
"I want you to know how sad I am to be giving up the best job in the world, but them's the breaks," he said.
Mr Johnson will remain in power until a successor is in place, expected to be by the autumn.
The Defence Secretary and a defence minister have suggested they will stay in post – regardless of who is prime minister.
Ben Wallace and Minister for the Armed Forces James Heappey say the Government has a duty to keep the country safe, no matter who is in place at the top.
Boris Johnson recently committed Britain to increase defence spending to 2.5% of gross domestic product (GDP), a measure of the size of the economy, by the end of the decade.
The Prime Minister's pledge followed lobbying from Mr Wallace and Foreign Secretary Liz Truss.
Boris Johnson this week told the House of Commons troop numbers are kept under "constant review" should the situation in Ukraine continue to change, responding to a question from Conservative MP and British Army veteran Johnny Mercer.
In November 2020, Boris Johnson announced what was billed by Downing Street as the biggest programme of investment in the UK Armed Forces since the end of the Cold War.
The PM set out a £16.5bn increase to the Ministry of Defence's (MOD) budget over the next four years.