LONDON — Prime Minister David Cameron faced another jarring reminder of the country’s deep divisions over whether Britain should stay in the European Union on Sunday when Mayor Boris Johnson of London, a fellow Conservative and one of the party’s most popular figures, announced that he would join the forces campaigning to exit the bloc.

Mr. Johnson’s defection highlighted the scale of the challenge Mr. Cameron faces in overcoming his country’s entrenched ambivalence about its ties to the Continent before Britons vote in or out in a referendum set for June 23.

Mr. Cameron returned to London from Brussels this weekend with a deal he says protects Britain’s “special status” within the European Union and provides some disincentives for immigration from other European countries, the most recent flash point in the long-strained relationship with the 28-member bloc. But his deal is a far cry from the “proper, full-on” change in Britain’s relationship with the European Union that he promised only last year.

Mr. Cameron has called this vote the “most important” in Britons’ lifetimes. But as is always the case with referendums, voters can make their choice on grounds well removed from the arguments of the elites. In this case, the outcome could hinge much less on Mr. Cameron’s deal than on how voters feel about any number of things: the European Union, British nationalism, immigration, the migrant crisis, nostalgia, racism, sovereignty or simply anger at the Conservative Party.