LONDON — Outside 10 Downing Street this week, Prime Minister Boris Johnson of Britain launched his election campaign with a broadside against his opponents — joking that delays to Brexit made him want to chew his necktie — but then abruptly changed tack.

With a wave of his arm, he promised the biggest program of health spending in a generation. Then came a pledge of billions of pounds for schools. That was followed by one to hire 20,000 police officers. As for rail and road, there would be nothing less than a “revolution” in infrastructure.

“It’s only if you have great public services that you can have a successful market economy,” said Mr. Johnson, banging his fists on a lectern to underscore the point.

After years of austerity from the ruling Conservatives many Britons would agree. Yet the promise to transform Britain’s creaking, overstretched, public services is one of the more remarkable election pitches of recent years.