Julia Gillard's hold on power has been rocked by Peter Slipper's resignation as Speaker last night after widespread condemnation over sexist and offensive text messages he sent to a former staffer.
Hours after surviving an Opposition attempt to oust him as Speaker by one vote, he stepped down "in the best interests of Parliament".
He will go to the crossbench as an independent, making him a new wildcard in the hung Parliament.
Labor sources said they expected Mr Slipper to side with the Government on key votes but Kevin Rudd supporters will seize on the resignation as further proof of the Prime Minister's bad judgment.
Deputy Speaker Anna Burke was elected unopposed last night to become the new Speaker.
The dramatic events came after a vitriolic war of words in Parliament, as Ms Gillard and Opposition Leader Tony Abbott laid bare their contempt for each other.
Seizing on text messages the Federal Court released from staffer James Ashby's sexual harassment claim against Mr Slipper, Mr Abbott launched a historic motion to remove the Speaker from his post.
Mr Slipper, a coalition MP before taking the Speaker's job last year, stood aside in April after Mr Ashby claimed his boss harassed him.
Messages Mr Slipper sent Mr Ashby include the Queensland MP's puerile references to female genitals and a suggestion that coalition frontbencher Sophie Mirabella was an "ignorant botch (sic)".
Mr Abbott said the text messages were not only "truly gross" but showed bias against coalition MPs.
"Every day the Prime Minister stands in this Parliament to defend this Speaker will be another day of shame for this Parliament, another day of shame for a government which should already have died of shame," Mr Abbott said.
The motion was lost 70-69 but not before the PM accused Mr Abbott of hypocrisy and of echoing the offensive comments of radio broadcaster Alan Jones about her father.
"The Government is not dying of shame. My father did not die of shame," she said.
"I will not be lectured about sexism and misogyny by this man, I will not. Not now, not ever.
"If he wants to know what misogyny looks like in modern Australia, he doesn't need a motion in the House of Representatives, he needs a mirror."
Mr Slipper, who initially issued a statement to apologise for his texts, returned to the Speaker's chair after five months to announce his resignation.
"I leave this position without rancour, with a great deal of sadness and more importantly with a great deal of regret," he said.
"I believe that given the controversy which has occurred in recent times, that it's in the interests of the Parliament that I should take the course of action that I have personally chosen to take.
"I do look forward to being vindicated of the false claims made against me."
Shortly afterwards, Mr Abbott told Parliament: "We do feel for him as a human being while we think that he has done the right and honourable thing by resigning from his high office.
"The member for Fisher has shown in this important respect he has good judgment."
After providing a Speaker, Labor has 70 votes in the 150-seat chamber and needs the support of five of the seven crossbenchers to pass legislation. The Opposition has 72 MPs, including WA Nationals Tony Crook.