In February, Gillard told her cabinet it was going to be an extremely difficult next six to eight months because of contentious policy challenges, starting with the imminent announcement of the carbon tax. Against the odds, however, the government had a reasonable five-week winter recess, a chance to get its breath. The indefatigable Tony Abbott had gone overseas and MPs reported the carbon tax issue was losing its sting. Even if voters still opposed it, they seemed less obsessed, less angry. The government used the break to focus on traditional Labor policy areas - health, the disabled, aged care. Gillard's personal numbers improved in the latest Herald/Nielsen poll, published a week before the August 21 anniversary of last year's federal election. They were significant shifts, albeit coming off a low base, and Labor's primary vote, at 28 per cent, was 10 percentage points lower than at the election.

It wasn't much, but for a battered government it was important. There was hope. When you are this far down in politics, you seize on anything. Then, suddenly, allegations first revealed in the Herald two years ago resurfaced and sparked a frenzy of reporting that began sucking the life out of the government. THE Thomson affair doesn't begin with the 2009 newspaper stories, nor really even with Thomson's alleged extravagances between 2002 and 2007, but in a bitter factional war within the right wing of the Victorian branch of the Labor Party. And you thought the NSW mob were bad. Thomson, a former assistant secretary of the Health and Research Employees Association of NSW, was elected national secretary of the HSU in 2002.

It was a tough gig. Even by union standards the HSU was hopelessly fractured and factionalised. It had a string of state-based branches - four in Victoria alone - which barely tolerated a national executive. Much of the energy and resources it should have been devoting to the 77,000 hospital clerks, orderlies and cleaners it represented were dissipated in its Byzantine structure and the intrigues it fostered. Thomson set to work unifying and rebranding the union and, according to some who worked closely with him, he enjoyed considerable success. The union became a more effective lobbying machine. But the power struggle at its core never waned. At the HSU's head office in Victoria, Thomson shared office space with Jeff and Kathy Jackson, a pair who though divorced remained political allies, determined to seize and hold control of the powerful Victorian No. 1 branch for their right-wing faction.

Thomson might have known he was heading into murky water. As far back as 1998 it had been reported that the then secretary, left-winger Jan Armstrong, had been accused by Jeff Jackson, the union's national liaison officer, of misusing union funds and financial mismanagement. She denied the allegations. In 2007 Thomson left the union and returned to NSW to contest and win the federal seat of Dobell on the state's mid north coast. The following year the power struggle in the union turned mean and public. In November 2008 HSU president Pauline Fegan was suspended, accused of bullying by Jeff Jackson, by then Victorian secretary. According to a consultant's report she had engaged in ''bullying, intimidation and manipulative behaviour'', which could lead to WorkCover claims, and had even ''locked people in cupboards and little rooms''. The allegations kept flying. In 2009 Jeff Jackson was forced out, charged under union rules with misappropriation of members' money, gross misbehaviour and neglect of duty. The Age reported on April 2 that Jackson was accused of spending union money on prostitutes. Though he denied the allegation, he repaid the union $15,000. The settlement documents that detail Jackson's repayment schedule make no mention of prostitutes.

Jackson said he was the victim of ''a very dirty political campaign'', pointing the finger back at Fegan, who was found by an external auditor to have spent $147,000 of union money on promotional goods sold by a company owned by her partner, Phillip Grima. She denied the spending was improper. Just six days after these revelations, the Herald broke the story that during his years as national secretary Thomson's HSU credit card had been used to withdraw $101,533, and to pay for prostitutes, restaurants, bars and other personal items. On the day of an HSU national executive meeting in Sydney, nearly $2500 was charged against Thomson's credit card. Thomson denied all the allegations. Whether it is true, many in Labor circles believe that the dossier on Thomson was leaked by Jeff's former wife, Kathy. Kathy Jackson is now national secretary of the HSU and controls four merged east coast branches along with Mike Williamson, the national president and a Thomson ally. It is understood to be a relationship of convenience. Williamson is also a former national president of the ALP.

One theory has it that Kathy went public with the information in order to force mass resignations, paving the way for a return to office of her former husband. Ms Jackson did not return calls. According to one senior HSU figure, the spending on Thomson's card would have been revealed as a matter of course, because over the years outgoing secretaries had left the union's finances in such a parlous state that the branches had insisted on audits being done at the end of each term. Either way Kathy Jackson ordered an investigation of Thomson's spending and eventually referred the matter to the Workplace Ombudsman, now known as Fair Work Australia. She wasn't to know her actions would precipitate such a political maelstrom. This week, under intense pressure, she handed the dossier to NSW police, casting herself as staunch defender of the interests of ordinary union members. Thomson maintained his denials and launched a quickly aborted defamation action against the Herald. The move proved to be a disaster for Labor because it unearthed a ream of material that would otherwise have stayed buried; it breathed new life into the story.

Worse, he was unable to cover his legal bills. It has since been reported that the ALP's NSW head office assisted him because Thomson would have been bankrupted and automatically excluded from political office, bringing on a by-election Labor couldn't win. The government's very existence was on the line. For reasons of Labor's political survival, Thomson couldn't resign and Gillard couldn't sack him. The former Labor powerbroker, Graham Richardson, says it should never have gone so far. In February 2009, Richardson tells people, he made a few inquiries and told Thomson to drop the lawsuit immediately. But there were more political bungles. Many in the party are furious that Thomson won preselection for Dobell despite the Herald's allegations. Other candidates, such as the former soldier David Mehan, wanted the seat. Richardson and John Della Bosca - the former ALP strongman and state minister, and husband of Belinda Neal - are believed to have pushed for Thomson to go.

But the NSW Right stuck with their man, spending their political energy ensuring Belinda Neal - a controversial figure but one accused of little more than being herself - was ousted from the neighbouring seat of Robertson. In the short term, it seemed they made the right call. As Labor seats tumbled around the country at last year's election, Thompson strengthened his hold on Dobell and Labor retained Robertson without Neal. The Prime Minister wasn't to know it then, but Thomson's victory would bring with it a terrible political canker. Four months after the election, the Herald published material its lawyers had uncovered during the defamation proceedings which directly challenged Thomson's claims about someone else using his credit card at brothels. Thomson continued to tell people he was innocent and right up until April - when he dropped the defamation action - he was telling colleagues and ministers he had won the case against Fairfax Media.

''He looked me in the eye and told me he won,'' a minister said. Publicly Thomson stood by his vague denials. Someone else could have used the card, he suggested, prompting the Herald to reveal that calls to brothels had been made from phones in hotel bedrooms hired in his name. He mentioned that in Victoria another official had repaid thousands of dollars to the union after claims of spending money in brothels, an apparent bid to conflate allegations against him with those made against Jeff Jackson. DIGGING by the Liberal frontbencher, Michael Ronaldson, largely kept the issue alive. On June 15, in a little-noticed Senate speech, Ronaldson said an innocent Thomson would not have dropped the case. He demanded Gillard publicly refute the allegations against Thomson or ''immediately sack Mr Thomson''.

Acutely aware that Thomson's collapse would end the government, the story has been attacked by every media outlet that covers federal politics. In the face of almost daily revelations about Thomson's alleged spending, the HSU bowed to pressure this week to refer the matter to police, prompting fury from some in Labor circles. Early indications from within the fraud squad suggest he may never be charged with anything. Since the HSU apparently issued Thomson with a credit card but no instruction on its use, it's possible no crime has been committed. So it here rests. To maintain government, Gillard must daily trash her credibility by mouthing empty support for her crippled MP. The Labor rank and file and members of affiliated unions have footed his legal bill. The HSU must co-operate with a police investigation that, if successful, will destroy the government. Craig Thomson can now serve the party he has damaged so badly only by fronting up to the humiliation daily. Loading

The biggest losers are the men and women doing hard dirty work for low pay in hospitals and aged care facilities who seem to have paid for the whole ugly farce. And for the Coalition, Thomson is the gift that keeps on giving.