Adelaide, Australia - Six months ago, the Australian prime minister narrowly avoided being dethroned after a rebellion within his own party.
Tony Abbott's leadership style had alienated many within the ranks, and as he sank lower in polls, his Liberal National Party (LNP) suffered "catastrophic" losses in the Queensland and Victoria state elections.
The LNP was not happy. While no distinct challenger materialised as an alternative to Abbott, two largely unknown West Australian backbenchers, Luke Simpkins and Don Randall, did stand up to voice the party's frustrations.
They had already sensed the mood was swinging against them among their local electorate, and they pushed for a vote to challenge Abbott on the leadership of their party - and consequently the country.
This did not produce any solid challengers either. Abbott scraped through the encounter intact, but the months since have been no less challenging.
What seems like a final test for Abbott's government is around the corner with an unexpected by-election on September 19.
Rocked by expense scandals, gaffes, and unpopular policies, the frustration within Abbott's government went public after he manoeuvred to stop a free vote on legalising same-sex marriage.
The pivotal moment came in July when the long-serving Don Randall died from a sudden heart attack, leaving his federal seat of Canning in the southeastern suburbs of Perth open to a by-election.
With a general election expected sometime late next year, the Canning run-off is widely seen as a measure of how well the Abbott government may fare.
So when Abbott flew to Perth in late August to help open the Liberal campaign, he did so knowing his job was on the line.
RELATED: Leadership tumult returns to Australia
The candidate chosen to succeed Randall for the Liberal Party is Andrew Hastie, a 32-year-old retired special forces captain.
The veteran of three tours in Afghanistan embodies Abbott's recent focus on national security issues and is a candidate seemingly tailor-made for the Canning electorate.
The son of a church minister and grandson to a decorated World War II veteran, Hastie joined the Australian Defence Force after the September 11, 2001 attacks on the United States and served as the commander of an elite Special Air Service unit.
Military, church, and family were the themes of his maiden speech at the Liberal Party conference where he launched his campaign beside Abbott and Foreign Minister Julie Bishop.
I have put my life on the line for this country and for that freedom. I have led under pressure and worked with honour, integrity, passion and diligence.
"I have not lived my life behind a desk, pushing paper and talking about the concepts of freedom and democracy," Hastie said.
"I have acted. I have put my life on the line for this country and for that freedom. I have led under pressure and worked with honour, integrity, passion, and diligence."
But on the day of his campaign launch, it was revealed that Hastie had commanded soldiers involved in a scandal in 2013, in which troops cut the hands off three dead Taliban fighters killed in combat.
All but one of the soldiers involved, including Hastie, have since been cleared of any wrongdoing on the basis the body parts were taken "as a last resort" to help identify the fighters killed.
The Liberal focus on national security has been used by the Labor opposition to attack the coalition over its track record on "jobs and growth", a favoured phrase of the prime minister.
It is also an issue important to the rough, working class Canning electorate where unemployment has been rising because of a downturn in the mining industry.
Labor's candidate is the 33-year-old lawyer Matt Keogh, who was the youngest person ever to serve as president of the Western Australian Law Society.
Keogh grew up in Canning, though he has since moved away, a detail which Labor has used to position him as the "true local" successor to Randall.
It is also an angle Bishop, Western Australia's most senior federal politician, sought to shut down by attacking Keogh as out of touch.
"The hipster Labor lawyer does not live in the electorate. He lives in Mount Lawley. His family lived in the electorate, but that's just a small point," Bishop said.
If left unchecked, it would be a dangerous characterisation for the Labor candidate in an extremely close race.
The latest polls have the federal coalition facing a huge 12-point swing against them that would be a devastating outcome for Abbott.
It has been half a century since a federal seat changed hands in a by-election following the death of a sitting member; before his death Randall was hugely popular for his anti-establishment brand.
Randall won the seat at the last federal election with an 11-point margin and 61.8 percent of the popular vote.
| Australian election rivals face off in debate
Should Hastie face a crushing defeat on September 19, it would be unprecedented and serve as an immediate judgement on the political future of the prime minister.
Even a close victory would be bad news as the election is already being seen as an indicator of how the party will do at the federal vote.
Should the party's backbenchers spook, it could still mean a direct challenge to Abbott's leadership.
Win or lose, Abbott has no plans to stick around for the aftermath, as he will fly to New York for a UN summit on terrorism.
Source: Al Jazeera