By Dominic Casciani
Home Affairs correspondent, BBC News
The role of home secretary is one of the toughest in government - and Jacqui Smith's two-year tenure started like nobody else's.
No sooner had she kicked off her shoes at the end of her first day than London was subjected to two failed Islamist car bomb attacks.
The Redditch MP had barely had time to start absorbing the scale of her brief - let alone to meet all of her top civil servants - when she was having to tell the public how she was overseeing the police's massive manhunt for the perpetrators.
Ms Smith's departure from the Home Office may be less dramatic - but like almost every one of her predecessors, her time in the post has been one policy battle after another.
Ms Smith took over the reins from John Reid who had been brought in after the resignation of Charles Clarke over failings in the immigration system.
Mr Reid began a massive reform programme and shortly before leaving did what a lot of people had long called for, creating a Ministry of Justice to take on the management of offenders, prisons, courts and constitutional issues.
42 days disaster
This meant that Ms Smith's job at the new-look Home Office was to be exclusively focused on immigration, identity, policing, security and terrorism.
But her tough, no-nonsense reputation as the former chief whip counted for little when it came to getting one of the government's most controversial measures through Parliament.
Former prime minister Tony Blair had tried to take detention of terrorism suspects without charge to 60 days before settling - after a Commons defeat - for an extension to 28 days.
JACQUI SMITH: HOME OFFICE BATTLES
28 June 2007: Appointed
29 June 2007: London car bomb attacks
30 June 2007: Glasgow Airport attack
July 2007: Admits smoking Cannabis
Jan 2008: Police march over pay
June 2008: Wins 42-days detention vote in Commons
2 Oct 2008: Sir Ian Blair quits
13 Oct 2008: Lords throw out 42-days detention
Nov 2008: Damian Green arrested
April 2009: No charges against Damian Green
Gordon Brown and Jacqui Smith pushed for 42 days, arguing the police needed exceptional powers for exceptional threats.
But while the legislation scraped through the Commons by just nine votes in June 2008 - the Lords inflicted an enormous defeat on the plans.
That damaged both her, and the prime minister's, authority and they decided not to press on with it.
Away from Westminster, Ms Smith alienated tens of thousands of rank-and-file police officers by appearing to deliberately pick a fight over pay.
She turned her back on a deal recommended by the independent salary body that the government itself had established.
For 90 years police have been banned from striking - but officers began openly talking about having that legal bar removed - and more than 20,000 marched though London.
Jan Berry, the former head of the Police Federation which represents ordinary constables, attacked Ms Smith in withering terms at their annual conference, referring to the home secretary's admission to having tried cannabis as a student - and her cabinet colleague Ed Balls' decision to implement a similar reward for teachers.
"I am sure you felt like reaching for a stab-proof vest and perhaps slipping into an old habit - lighting up, calming your nerves," said Ms Berry.
"Home secretary, what is it that Mr Balls has but you do not? Your decision not to honour the pay award was a breach of faith.
"It was a monumental mistake, and I don't say this lightly when I say you betrayed the police service."
But perhaps the single most damaging blow to her standing came in the shambolic resignation of Metropolitan Police Commissioner Sir Ian Blair.
Jan 2008: Thousands of white-capped police took to the streets
Ministers liked the commissioner because of his astute political skills and willingness to modernise the police.
Ms Smith had resolutely stood by him over the mistaken shooting dead of Jean Charles de Menezes, despite enormous pressure on him to go.
But when the new Conservative mayor of London Boris Johnson became chair of the capital's police watchdog last autumn, he moved with breathtaking political speed to make the commissioner's position untenable - despite having no legal powers to oust him.
Sir Ian felt he had no choice but to quit - and there was little Ms Smith could do to retain the services of the most important police officer in the country.
Weeks later, things got worse when the Met arrested Tory frontbencher Damian Green who'd been embarrassing the Home Office through leaks.
Ms Smith denied knowing police were investigating Mr Green - but said the systematic leaking was damaging the integrity of the civil service.
Ms Smith's legacy will be as one of the youngest, and the first woman, to hold one of the highest posts in British politics.
She will be remembered by officials as a calm and personable secretary of state who worked hard to bed in vital reforms to the immigration system, counter-terrorism and security strategy.
She invested a great deal of time in trying to find new ways of improving public confidence in criminal justice - including the much vaunted new local policing pledges.
But she also takes the blame for policy miscalculations, such as settlement rights for Gurkhas, even though the allowed her immigration minister Phil Woolas do the public talking.
But in the end it seems that her departure was nothing to do with the policy battles. The disastrous days of October 2008 when she lost both her key terror measure and the Met Commissioner did not seal her fate.
Rather, the revelations about her expenses - notably the embarrassing claim for the cost of pay-TV services including adult movies - led her to conclude that it was "the right thing for her family" to stand down.