After weeks of wrangling, Northern Ireland’s Democratic Unionist Party agreed on Monday to give Prime Minister Theresa May the votes she needs to stay in office and push through legislation ensuring that the United Kingdom exits the European Union.

While the Democratic Unionist leader, Arlene Foster, spoke of the deal being “in the national interest” of the U.K. as a whole, commentators pointed to what looked like a massive concession to Northern Ireland’s local government — an additional 1 billion pounds in social welfare spending.

The money, though, was probably less important to the D.U.P. than staving off what it sees as a nightmarish alternative: the specter of Jeremy Corbyn, the leader of the opposition Labour Party, becoming prime minister.

That’s because the election campaign that just concluded, with a hung Parliament in which no single party holds a majority of seats, kicked off a remarkable surge in popularity for Corbyn. That surge, lifting Corbyn and Labour, has shown no signs of abating since the votes were cast on June 8.

The Labour leader was widely seen to have handled the aftermath of the tragic fire at Grenfell Tower in London better than the prime minister — comforting victims as she dodged the public — and opinion polls suggest that his party would win a new election if May is unable to govern.

While Corbyn’s plans to end austerity and reverse cuts to social-welfare spending are anathema to the Conservatives, his long history of support for Sinn Fein, the former political wing of the I.R.A., has made him into a hate figure for the D.U.P. whose voters identify as British, not Irish, and fear being eventually absorbed into a united Ireland.

Scenes of the rapturous reception for Corbyn this weekend at the Glastonbury music festival — where he quoted Percy Bysshe Shelley and heard his name sung repeatedly to the tune of the White Stripes’ anthem “Seven Nation Army” — must have instilled a sense of fear bordering on panic in both the Conservative and D.U.P. camps.

The chant of “Oh, Jeremy Corbyn,” continued to ring out around Glastonbury all weekend, even after the man himself had left the stage.

After the terms of the deal between the government and the D.U.P. were made public on Monday, Corbyn denounced the agreement as not “in the national interest, but in the interest of Theresa May and the Conservatives’ own political survival.”

“Austerity has failed,” Corbyn added. “Cuts to vital public services must be halted right across the UK, not just in Northern Ireland.”

Top photo: Jeremy Corbyn spoke at the 2017 Glastonbury Festival on Saturday in Glastonbury, England.