WHEN Stephen Harper led his Conservatives to victory in 2006 and formed a minority government, few Canadians expected it to last. The Liberals, who had dominated national politics for much of the past century, saw it as an interregnum. They did not have the measure of Mr Harper. Through the force of his personality and his ideas, the prime minister kept his party in power, winning a second minority in 2008 and then a majority in 2011. By the middle of this month he will have been in office longer than all but seven of Canada’s 22 prime ministers. Love him or loathe him, as Canadians do in equal measure, no one can deny that he is a remarkably successful politician.

But as parliament reconvenes this month for the last complete session before a general election, scheduled for October 2015, Mr Harper is in trouble. The baggage accumulated by all long-serving governments is weighing him down. The economy, supposedly a Conservative strong point, is fragile. For the first time in a decade Mr Harper is facing a popular Liberal leader, in Justin Trudeau. Mr Harper dismisses speculation that he might resign as “surreal”. But the window may be closing on his long-term project to remake Canada in the Conservative image.

A Liberal triumph would be a bitter blow for Mr Harper, who in his youth was a keen supporter of Pierre Trudeau, Justin’s father. He shifted to the Progressive Conservatives after he moved to the energy-rich western province of Alberta, and then road-tested a few right-leaning parties before deciding to set up his own. In 2003 he orchestrated a merger of the centrist Progressive Conservatives and the right-leaning Canadian Reform Conservative Alliance. Uniting the fractured right-of-centre parties into a new Conservative party gave him the clout in 2006 to displace scandal-stained Liberals.

In office he has stuck to an agenda he first set out in 2003. Canadian Conservatives, he said then, should adopt principles laid out by Edmund Burke, an 18th-century British philosopher. They should favour private property and small government and look to society, rather than the state, to solve problems. They should resist public ownership, government intervention, egalitarian redistribution and state sponsorship of secular humanist values. In sum, they should be against most of what Canada’s Liberal governments stood for during decades of power. Although Mr Harper has been forced to put a lot of water in his wine, he has followed through on many aspects of this creed. Federal tax revenues as a share of GDP have fallen during his time in office. Direct spending has been cut in order to bring the deficit, which soared to record heights after the 2008-09 recession, down to zero by next year. The government has chopped nearly 26,000 civil-service jobs over the past three years, and more public-sector job losses are expected. The prime minister has firmly resisted calls for sweeping social programmes—he dropped Liberal plans for national child-care provision, for example. Mr Harper has also held out against a national carbon tax to address climate change. To the disappointment of social conservatives, he has trodden more carefully in areas touching on religion, refusing to legislate against abortion, same-sex marriage or in favour of capital punishment. Attempts by government backbenchers to bring about the same ends through private-members bills have been quashed. He has thrown the right some sops with endless crime bills, some of which have been dismissed by the Supreme Court. Beyond Canada’s borders a more sharp-elbowed foreign policy, which Mr Harper sums up as “no longer just to go along and get along with everyone else’s agenda”, marks a noticeable departure from the Liberal era. Under Mr Harper Canada has withdrawn from the Kyoto protocol, an accord on climate change. The prime minister is ardently pro-Israel and remained a cold warrior long after many thought that conflict had ended.

Such consistency and clarity have not translated into personal popularity. Attempts to humanise him by playing up his love of ice hockey, cats and the Beatles have fallen flat. “People don’t like him, but they respect him,” says André Turcotte, a political scientist who conducts polls for the Manning Centre, a right-wing think-tank. Tom Flanagan, who worked with Mr Harper on his early political campaigns, describes him as “ruthless” and “a predator” when he has an opponent in his sights.