BY THE time he had finished speaking, Jeremy Corbyn had made some unlikely friends. The Labour leader was in Coventry, declaring that under his radical left-wing government Britain would remain in a customs union with the EU after Brexit. The Confederation of British Industry, hardly a bastion of socialism, hailed the policy as a “real-world solution”. Rebellious Conservative MPs campaigning for a soft Brexit cheered it. Labour MPs who had bayed for Mr Corbyn’s sacking after the EU referendum, only 18 months ago, heaped praise on the announcement.

After the ridicule and rebellion that dogged his start as leader of the opposition, it is quite a reversal. Recent Labour leaders have faded in the role. Mr Corbyn has done the opposite. “He’s gone from Mr Bean to Stalin,” says one adviser. Two-and-a-half years into the job, Mr Corbyn has never been stronger. Once-mutinous MPs have fallen into line. Corbynites fill crucial positions in the party’s apparatus. Left-wingers dominate Labour councils in London. But Mr Corbyn’s rule is far from absolute.

In the parliamentary Labour Party, peace reigns. “Acquiescent” is the common description of backbenchers. If offered an immaculate ejection of their party leader, most MPs would take it. For some of those close to the Labour leader, the feeling is mutual. But with Labour nudging ahead of the Tories in opinion polls, there is no appetite for a coup, and deselecting troublesome MPs is easier said than done.

In some local parties, by contrast, bloody intraparty battles rage. In Haringey, a Labour-run north-London borough, the controversial redevelopment of a run-down housing estate sparked a civil war from which the left wing of the local party emerged victorious. The result was the deselection or resignation of more than 20 Labour councillors, under pressure from Momentum, an activist group founded to support Mr Corbyn. After a round of local elections due in May, Haringey is likely to become the first Momentum-controlled council in the country. Meanwhile in Newham, east London, Sir Robin Wales for the first time faces a battle to be reselected as Labour’s mayoral candidate. His opponent? A Momentum-backed candidate.

Outside London, Momentum is finding the going harder. It has caused barely a ripple in the sea of red that is Labour’s northern urban territory. All 96 of Manchester’s council seats (of which Labour holds 94) are up for election in May. Only six candidates belong to Momentum. It is a similar story in Leeds, where Momentum has ten candidates running, out of 99. In other big cities, such as Birmingham, Sheffield and Newcastle, Momentum has struggled to gain significant footholds. The group’s own organisers say this shows that its supposed takeover of the Labour Party is a myth. “When you look at the numbers, it just isn’t there,” says one. Arranging a municipal purge takes time, manpower and a near-superhuman stamina for procedural warfare. It is one thing to pull it off in a densely populated London borough, with an eager supply of activists a Tube ride away, but quite another to do it in the regions, points out one activist from another wing of the party. Deselecting rebellious MPs would prove even trickier, they argue. For now, at least, a block of moderate local politicians and MPs who often only grin and bear Mr Corbyn’s policies is set to stay. Labour’s central party apparatus, by contrast, is increasingly stuffed with true believers. On February 23rd Iain McNicol, the moderate general-secretary, resigned after months of criticism from left-wingers. The two most likely contenders to succeed him are Jon Lansman, the founder of Momentum, and Jennie Formby, an apparatchik from the Unite union, Labour’s biggest donor. They disagree on whether members or unions should have the bigger say in how the party is run. But both are strong supporters of Mr Corbyn, in whose image the party is slowly being remade. Yet although Mr Corbyn’s critics have surrendered control of the party bureaucracy, other battles are still under way. “The organisational fight may be being won by the hard left, but the philosophical and policy fight is up for grabs”, says one senior Labour MP. The most important battleground is Brexit. This week Mr Corbyn reiterated that Britain “voted to leave the EU, that’s a done deal.” But Labour’s position on the manner of departure is still in flux, as shown by the customs-union shift.

For Mr Corbyn, a lifelong Eurosceptic who in the end campaigned tepidly for Remain in the referendum, Brexit sometimes seems to represent a political obstacle rather than a matter of great ideological interest. Some of Mr Corbyn’s opponents fear that he would use Brexit to administer a “reverse shock-doctrine”, using Brexit-induced trauma as an excuse to foist socialism on Britain. Yet some in Mr Corbyn’s camp worry about the opposite—that Brexit may create a black hole in the public finances that would rule out some of the party’s expensive policies. So far, Labour’s position on Brexit has been driven by a simple aim: to get elected.

That will not be easy. The party’s members are solidly pro-EU: 89% voted to remain, as did 96% of Labour MPs. Among Labour voters, however, the figure was 64%. The defection of Labour’s Leave-voters would torpedo its chances of forming a government. Yet for most people there is more to life than Brexit, argues Kevin Cunningham, a former Labour adviser and now a pollster at XY Campaigns. The party’s position on more familiar issues may keep voters loyal. Labour’s Leave-voters strongly support Corbynite policies such as nationalisation and are generally left-wing, points out Mr Cunningham.

Meanwhile, Labour’s softening line on Brexit creates the prospect of splitting the Conservatives, whose contingent of Remain voters is roughly equal to Labour’s Leave minority. Tory rebels have already proposed legislative amendments designed to keep Britain within a customs union, which could inflict a damaging defeat on Theresa May’s government if Labour supports them (see Bagehot). Mr Corbyn’s new stance placates those Labour MPs who had demanded he come up with a softer Brexit policy, and creates a potential route to Downing Street should Brexit blow up for the Tories. The Labour leader may not have total control of his party, but he is moving closer to a bigger prize.