From BBC News:
Mr Brown has officially tendered his resignation to the Queen at Buckingham Palace, and recommended Conservative leader David Cameron succeed him.
Speaking alongside his wife Sarah outside No 10 Downing Street, he said the job had been “a privilege” and wished his successor well.
His decision comes as the Tories and Liberal Democrats are poised to agree a deal to form a government.
Mr Brown said he had taken the decision to resign after concluding he would not be able to form a government after days of talks between the parties following Thursday’s inconclusive election result.