Nationals defector Llew O'Brien delivered a blow to the government on Monday, leaving his party in further disarray and exposing Prime Minister Scott Morrison's fragile hold on votes in parliament.
Mr O'Brien resigned from the Nationals on Sunday in protest over the party's failure to restore Barnaby Joyce to the leadership in last week's coup attempt.
Then on Monday, he was elected deputy speaker, running in a secret ballot against his own colleague, the Nationals' Damian Drum.
It was a vote that no one expected, least of all Mr O'Brien himself. The government nominated the Nationals' Damian Drum for the deputy speaker's job, expecting a simple vote. Mr Drum's wife was in the public gallery to watch his expected election to the role, and Mr O'Brien's win will leave the Liberals and some in the National Party fuming.
Mr O'Brien was nominated by Labor, but Labor gave him no forewarning. He accepted on the spot, and the decision of at least five of the Nationals' 16 lower house members to vote for him betrays the divisions in the party. It weakens the leadership of Michael McCormack, and increases the likelihood that he will face another leadership challenge.
Labor was exploiting those divisions after Mr Joyce had earlier canvassed nominating another National, Ken O'Dowd, for the deputy speakership. Mr O'Dowd had declined, citing party unity. But Labor had no inkling of how successful its play would be - not even knowing whether Mr O'Brien would accept the nomination.
Mr O'Brien evidently won the votes of Barnaby Joyce and Mr O'Dowd, with Joyce backers George Christensen and David Gillespie also considered likely to have supported him. He won 75 votes to 67.
The vote demonstrated Mr Morrison's fragile hold on the lower House where he has a majority of two and Mr McCormack's fragile hold on his own party.
Mr Morrison attempted to skate over the loss and keep Mr O'Brien onside, congratulating him for his win and praising his performance.
But Labor Leader Anthony Albanese said the vote demonstrated the instability of the government.
"No amount of marketing or spin can hide the humiliation of the government from that vote," he said. "We've just seen the stability of the Coalition on full view, government members running against each other for the position of deputy speaker of House of Representatives."
Mr McCormack also attempted a recovery from the vote, saying "that's democracy".
Mr O'Brien's position was already creating consternation on Monday after he resigned from the Nationals but said he would continue sitting in the Liberal-National party room. He was due to meet Mr Morrison on Monday evening to discuss how that might work.
During question time just ahead of the vote on the deputy speakership, Mr O'Brien moved seats to hold a lengthy conversation with the crossbench about setting up a federal integrity commission.
Speaker Tony Smith looked shocked as he delivered the vote numbers, then told Parliament he would have to consider what to do about the role of second deputy speaker - since parliamentary rules say if the deputy speaker is a government member the second deputy must be from another party - and vice-versa.
Mr Smith was evidently not sure whether Mr O'Brien counted as a government member, but Mr O'Brien told him that he had clearly stated that he was still a member of the government.
"I remain a loyal and faithful member of the government," he said.
Asked later whether he would cross the floor on government legislation, Mr O'Brien said he would consider legislation as it was presented.
Labor had 64 votes. Of the six crossbenchers, the Greens Adam Bandt and independents Bob Katter, Andrew Wilkie and Helen Haines are known to have voted for Mr O'Brien.
Zali Steggall and Centre Alliance Senator Rebekha Sharkie are refusing to say who they voted for, but if they voted for Mr O'Brien, then five votes came from the government benches. That level of defection is a significant blow for Mr Morrison.