Just over a year ago, David Cameron was hailed as the greatest Conservative leader since Thatcher, leading the party to a majority General Election victory for the first time in more than two decades.

Today, his career lies in tatters as he has announced his resignation in the wake of the country's vote to leave the European Union.

Throughout his 11 years at the head of the Tories, Mr Cameron sought to promote a 'modernisation' agenda and seize the political centre - dodging potential trouble with last-minute solutions in an approach which saw him labelled the 'essay crisis Prime Minister'.

But he will be for ever remembered as the premier who lost a referendum he himself promised in order to boost his party's chances at the polls.

He's out: David Cameron pictured today as he announced his resignation as Prime Minister

Devastated: Mr Cameron was joined by his wife Samantha for the emotional announcement in Downing Street

He first burst onto the political scene as a promising young contender for the Conservative leadership in 2005, at the age of just 38 and after only four years in the House of Commons as MP for Witney.

He had previously worked in public relations and shared as an aide to Chancellor Norman Lamont, most famously on Black Wednesday in 1992.

Mr Cameron, then Shadow Education Secretary, defeated the strong favourite David Davis by adopting a more casual demeanour and centrist ideology.

He impressed the public in a string of relaxed media appearances, in which he famously refused to wear a tie, as well as when he delivered a speech to the party conference without using notes.

Despite his privileged background - he went to Eton and Oxford, where he was a member of the notorious Bullingdon Club, and his wife Samantha is the daughter of a viscount - he was seen as less 'out of touch' than the Right-wing Conservatives who had dominated the party.

After winning the race to succeed Michael Howard, Mr Cameron staged a number of eye-catching publicity stunts such as travelling to the Arctic for a photo opportunity with a pack of huskies.

Beginnings: David Cameron was an aide to Chancellor Norman Lamont during the 1990s

Contender: Mr Cameron pictured during the Conservative leadership contest in 2005

Breakthrough: The young MP impressed voters with his 2005 party conference speech, which he delivered without any notes

In a bid to steal the centre ground from Labour rivals Tony Blair and Gordon Brown, he focussed policies on issues such as social inclusion - dubbed 'hug a hoodie' - and climate change.

While some saw him as too immature to lead the country, he rose in the esteem of many when he suffered an appalling personal tragedy, the death of his severely disabled son Ivan, in 2009.

Mr Cameron surrounded himself with old friends, sometimes derided as the 'Notting Hill set', such as George Osborne and Michael Gove, later appointing them to senior positions in his Cabinet.

But although his alliance with Mr Osborne has remained rock-solid, he is said to have fallen out with Mr Gove when the Justice Secretary chose to back Leave in the EU referendum.

Mr Cameron entered Downing Street as Prime Minister in May 2010 - despite his failure to secure a majority in the General Election.

In a bold move that surprised many observers, he immediately made 'big, open and comprehensive offer' to the Liberal Democrats to join together in a Coalition, Britain's first for 65 years.

Tragedy: Mr Cameron was devastated by the death of his severely disabled son Ivan in 2009

Publicity: Mr Cameron took part in a string of high-profile photo shoots such as visiting the Arctic in 2006

Coalition: After going into Government with the Liberal Democrats, the new Prime Minister held a press conference alongside his deputy Nick Clegg

Respect: Mr Cameron with the Queen shortly after taking office; he was once caught on camera saying that she 'purred' when she was told the result of the Scottish independence referendum

He walked into Number 10 alongside Nick Clegg and led a Government which focussed heavily on reducing the deficit in the wake of the financial crisis and the Great Recession.

Working closely with Mr Osborne as Chancellor, the Coalition managed to half the deficit in five years by imposing sharp cuts to public spending.

Mr Cameron developed a reputation as an 'essay crisis Prime Minister' - repeatedly running into crises only to solve them at the last minute.

He was threatened by a number of serious problems, such as the phone hacking scandal, the 'omnishambles' 2012 Budget and the Scottish independence referendum, but managed to survive them all. Today his luck ran out.

The Prime Minister also made a number of bizarre gaffes, such as telling the Mayor of New York that the Queen 'purred down the phone' when he told her the 2014 Scottish vote had been won.

Allies: Mr Cameron worked closely with Barack Obama throughout his six years in office

Friends: The Prime Minister received strong support from Chancellor George Osborne

Rivals: Despite Mr Cameron's close friendship with Michael Gove, the two fell out over the EU referendum

Enemies: The Prime Minister has a troubled relationship with his old schoolfriend Boris Johnson

And some criticised his 'chillaxing' style of governing - an aide once said that he spent 'a crazy, scary amount of time playing Fruit Ninja on his iPad'.

Many had written him off before last year's Election, with polls showing the Tories neck-and-neck with Labour and some observers predicting that Ed Miliband would replace him in Number Ten.

But he showed his steel by pulling off an unexpected majority victory, the Conservatives' first since 1992, forcing the instant resignation of the leaders of the three other main parties.

Ironically, one of the triggers for his Election victory was said to be his promise of an in-out EU referendum - the issue which ended up bringing him down.

He made the pledge in order to avoid an electoral challenge from Ukip, although some have speculated that Mr Miliband was such a weak opponent that Mr Cameron would have won a majority anyway.

In office: Mr Cameron pictured in Number 10 on the phone to Barack Obama in November 2012

On the trail: The Prime Minister appeared to bore a schoolgirl as he was campaigning in April last year

Victory: The peak of his career came in May 2015, when he won re-election with a parliamentary majority

In the end, the referendum proved his undoing, dominating the single year of his second term and opening up bitter splits in the Conservative party.

Mr Cameron launched what he said would be a major renegotiation of Britain's position in Europe - but the results were widely derided, even by many pro-EU campaigners.

Despite having claimed that he was prepared to vote to leave the EU if he did not get the reforms he wanted, the Prime Minister led a mostly negative In campaign dubbed 'Project Fear' for its focus on dire warnings about the consequences of Brexit.

After the bombshell of the Leave vote, Mr Cameron was visibly moved this morning as he made his resignation speech alongside his wife outside Number 10.

His voice wavering, the Prime Minister said: 'I think the country requires fresh leadership to take it in this direction.'