OTTAWA - Before he could take to the airwaves to fight for his job, Stephen Harper first had to revive the morale of a dispirited team and rekindle his innate combative streak.

Several sources close to the prime minister say he went from brooding to brawling in the span of a few key hours on Monday afternoon.

Harper began Dec. 1 feeling miserably.

People close to him say he started the day sounding almost resigned to the defeat of his Conservative government.

He was exhausted. A bug he picked up a week earlier in Peru had morphed into a bronchial infection. The bags under his eyes and the room around his shirt collar attested to his lack of sleep and his failure to hold down much food.

A blunt exchange with his inner cabinet wasn't going to make him feel much better. He confessed to his senior ministers that he had made a serious political miscalculation.

He huddled individually with senior ministers, gave an emotional speech to his MPs, and was jolted by television images of his adversaries inking a pact to supplant him.

Watching his foes agree to usurp him appeared to have a salutary effect on Harper. His mood went from defeat to defiance as he made the 200-metre drive from his office to the Conservative party Christmas celebration at the Westin hotel.

"The moment he spoke to our Christmas party it was clear he had rallied -- and was rallying the party and the caucus," said Immigration Minister Jason Kenney.

The story of Harper's shift in temperament begins in Peru.

He returned from an APEC summit in Lima early last week feeling ill. Something he had eaten disagreed with him. The travel sickness gave way to a cold. By mid-week he was taking medication for a lung infection.

With the ailing prime minister absent from the Conservatives' weekly caucus meeting Wednesday, Nov. 26, Finance Minister Jim Flaherty briefed MPs on the contents of the next day's economic statement.

Few concerns were expressed about the cut to political party subsides, aside from the odd question about whether the lost public funds would force Conservatives to cut staff.

By the end of the exchange on party subsidies, the stately old parliamentary reading room where Conservatives held their meeting was rumbling with the cheers of MPs.

"The roar of approval was deafening," said one senior caucus member.

"They blew the doors off the place, they were so happy."

Conservatives immediately realized the move would kneecap their political opponents. Clearly, the opposition saw it, too.

By week's end the capital was abuzz with talk of a coalition government, and Harper made a late-day appeal Friday for voters to express outrage over the opposition plot.

The Tories began climbing down over the weekend: gone were the subsidy ban and the strike ban on public servants, two of the more controversial parts of the economic statement.

But opposition parties weren't budging. They said they had lost confidence in the government.

The weekend also provided the nation's capital with one of the most surreal social gatherings it has ever seen.

Conservatives appeared glum at the annual parliamentary press gallery dinner.

Partygoers largely eschewed the glamour and glitz of the annual event. A tuxedo-clad Environment Minister Jim Prentice huddled with an interlocutor in the shadow of the giant totem poles that adorn the Museum of Civilization's great hall in Gatineau, Que.

The prime minister's spokesman, Kory Teneycke, chatted amiably with NDP Leader Jack Layton, one of the three party leaders planning to boot him out of his job.

There was no end of Conservative grumbling at the gala that Harper had to do something to turn the tide. Their disquiet grew over the weekend and made itself known to the prime minister.

Harper convened a meeting of his priorities-and-planning committee on Monday -- an inner group within his cabinet that comprises his 12 most senior ministers.

The mood was grim. In Harper's circle, one source said the sentiment was that if the opposition wanted to try their hand at governing during an economic crisis, "Let them have it."

He was given an earful from ministers who expressed disbelief at what was transpiring.

Harper acknowledged he'd expected at least one opposition party to cave in a confidence vote, most likely a Liberal party saddled with an unpopular leader and embroiled in a campaign to choose his successor.

One source says Harper responded bluntly: "We misjudged the reaction of the opposition."

After the meeting of his inner cabinet, the prime minister invited some of his most trusted ministers for one-on-one exchanges. They filed in separately: Tony Clement, Rob Nicholson, Jim Prentice, John Baird, Jay Hill, Christian Paradis, and Marjory LeBreton.

The common theme was that he needed to take extra steps to halt his slide from power.

Harper then walked down the stairs, past the Commons lobby and into a special meeting of his alarmed caucus.

He broke with custom; instead of opening the meeting with a speech, Harper said he understood his MPs had been in their ridings, heard from their constituents, and now he wanted to hear from them.

Several of them conveyed their shock and disappointment over the tumult that threatened to toss them imminently across the aisle and into the opposition benches.

One MP said Harper then delivered an emotional speech in which he took the blame for what was happening: "(The funding cut) was a caucus decision. But I'm the leader and this is my responsibility."

A few hours later, Stephane Dion, Jack Layton, and Gilles Duceppe were seated in almost exactly the same spot, at a table in Centre Block's resplendent reading room.

Harper was a flight of stairs away, watching the scene from his office on the third floor of Centre Block. As the TV in the corner flashed images of the three opposition leaders inking a deal to take office, sources describe his two reactions.

Harper was dismayed, they say, by the sight of the Bloc Quebecois leader seated alongside a government-in-waiting.

And he also appeared to spot a political opening.

Instead of defending the subsidy cuts, or the anti-strike legislation, or the dearth of economic stimulus in his fiscal update, Harper could now mount a vigorous defence of something bigger: Canada.

The prime minister wasted no time cladding himself in the flag during a raucous speech to the party faithful at the Conservative staff Christmas party.

Party members who arrived at the gathering feeling gloomy and fretful about losing their jobs said they felt more optimistic after the fiery pep talk.

The same Conservative MPs who appeared stricken during question period on Monday left the hotel relieved that their boss was back in fighting form.

"He was facing this bone-crushing pressure. We could all feel that," Kenney said.

"But . . . (he) gave an electric performance (at the Christmas party). It was a vigorous defence of Canada's national interest."