LONDON — Tony Gallagher, editor of The Sun, one of Britain’s most raucous and influential tabloids, looks down on the government, literally. From the height of his 12th-floor newsroom, all glass and views, the Palace of Westminster seems like a toy castle, something to be played with or ignored at will.

Mr. Gallagher also looks down on the editor of the more measured Times of London, whose office is one floor below and who makes a point of keeping his blinds drawn. The hierarchy is not lost on either man.

In Britain after the so-called Brexit vote, the power of the tabloids is evident. Their circulations may be falling and their reputations tarnished by a series of phone-hacking scandals. But as the country prepares to cut ties with the European Union after a noisy and sometimes nasty campaign, top politicians court the tabloids and fear their wrath. Broadcasters follow where they lead, if not in tone then in topic.

Their readers, many of them over 50, working class and outside London, look strikingly like the voters who were crucial to the outcome of last year’s referendum on membership in the European Union. It is these citizens of Brexitland the tabloids purport to represent from the heart of enemy territory: Housed in palatial dwellings in some of London’s most expensive neighborhoods, they see themselves as Middle England’s embassies in London.

In the campaign leading up to a snap election on June 8, most tabloids can be counted on to act as the zealous guardians of Brexit and as a cheering section for the Conservative government of Prime Minister Theresa May — even though the city that houses them voted the other way.

Image

The Sun offices are just below Mr. Murdoch’s office.CreditJosé Sarmento Matos for The New York Times

Mr. Gallagher made his mark on three of Britain’s most stridently pro-Brexit newspapers. He was editor of The Daily Telegraph, a conservative broadsheet, and deputy editor of the more midmarket Daily Mail, one of The Sun’s main rivals, before Rupert Murdoch poached him 20 months ago. Together, these three titles are a central reason that print coverage of the referendum campaign was skewed 80 percent to 20 percent in favor of Brexit, according to research by Loughborough University.

In the marble-and-glass lobby of the 17-story News Building, home to Mr. Murdoch’s British media empire, there is a small plaque that commemorates the building’s 2014 opening by Boris Johnson, then the mayor of London and now the British foreign secretary.

Mr. Johnson, wild-haired and witty, became a chief architect of Brexit when, four months before the referendum, he threw his weight behind a cause until then most closely associated with the populist U.K. Independence Party. But his main contribution to Brexit may go back more than two decades.

A correspondent in Brussels for The Daily Telegraph in the early 1990s, Mr. Johnson was credited by fellow reporters with pioneering the euroskeptic coverage of the European Union that has since become the default setting for much of the British press. With little regard for the truth — he was previously fired by The Times of London for making up a quote — Mr. Johnson wrote about a Europe scheming to impose standard condom sizes and ban his country’s beloved prawn-cocktail-flavored chips (both untrue).

“Boris invented fake news,” said Martin Fletcher, a former foreign editor of The Times, who was in Brussels shortly after Mr. Johnson. “He turned euroskepticism into an art form that every news editor in London came to expect.”

Before the referendum, Mr. Fletcher added, “Boris campaigned against the cartoon caricature of Brussels that he himself invented.”

The campaign was marked by a relentless drip of anti-immigration rhetoric and a couple of big lies that stuck: the 350 million pounds (about $450 million at current rates) that Britain paid to the European Union every week (false) and the prospect of millions of Turks’ making their way to Britain if it stayed in the union (Turkey is not joining the bloc). Two years ago, the United Nations urged Britain to deal with hate speech in its newspapers, specifically citing a column in The Sun that compared migrants to cockroaches and the norovirus.

The tabloids say they merely reflect the concerns and fears of their readers. But their critics say they poison the debate by playing to people’s worst instincts and prejudices, distorting facts and creating a propaganda ramp that mainstreams intolerance and shapes policy.

Image

Tony Gallagher, editor of The Sun, in his office. CreditJosé Sarmento Matos for The New York Times

Respected, and Feared

I had emailed Mr. Gallagher seeking an interview on March 29, the same day Britain delivered a letter to European Union leaders in Brussels formally initiating the two-year Brexit negotiations. I argued that it was difficult to understand Britain today without understanding the tabloids. He must have agreed.

The elevator rose past the offices of The Wall Street Journal, the Dow Jones news agency, The Sunday Times and The Times, all the way up to The Sun’s newsroom. Mr. Murdoch, proprietor of The Sun since 1969, sits right above.

At The Telegraph, Mr. Gallagher won respect for overseeing coverage of one of the biggest political scandals in recent British history: More than two dozen lawmakers resigned after the paper revealed widespread abuse of allowances and expenses that paid for, among other things, limed oak toilet seats and the clearing of a moat.

But he also has a reputation for losing his temper. “Mail Men,” a new book about The Daily Mail, where Mr. Gallagher spent much of his career, quotes former colleagues describing him as a “figure of death” who “put the fear of the devil into his reporters.”

A tall, lean figure, he guided me to a seat opposite a panoramic view of London. Throughout our conversation, he was cautious and mostly unsmiling, but polite. (He called the book’s depiction of him “mean.”)

Unprompted, he pointed to a staircase and explained that The Sun’s newsroom was the only one in the building with direct access to the management floor. (“They are up and down those stairs all the time,” a journalist said later. “They” are Mr. Murdoch, when he is in town, and his British chief, Rebekah Brooks, a former editor of The Sun and of the now-defunct News of the World who was charged with criminal offenses related to phone hacking but was cleared by a jury in 2014.)

Mr. Gallagher was still enjoying the aftermath of a recent showdown with the government. The Sun had printed bumper stickers and run an eight-page special report on how a rise in national insurance contributions for self-employed people would hurt “White Van Men,” shorthand for members of the working class, who, in The Sun’s view, were getting the shaft.

Image

A front-page splash last fall insinuated that child refugees arriving in Britain from Calais, France, were lying about their ages and should have dental X-rays.

It was the first time the tabloids had turned on the nine-month-old government of Mrs. May, and she swiftly retreated. “It took them less than a week,” Mr. Gallagher recalled.

He recounted the fury of David Cameron — Mrs. May’s predecessor as prime minister, who called for the referendum and campaigned to stay in the European Union — when The Sun turned against him on Brexit with a blistering front-page attack.

It so happened that Mr. Gallagher had a prearranged meeting with Mr. Cameron that day — “Just a catch-up,” the editor recalled. Mr. Cameron was cursing “about the coverage that he was getting in the early stages of the referendum,” Mr. Gallagher said. “He was in a red-faced four-letter rage.”

“I put my pen in my mouth because I thought I was going to burst out laughing,” he added.

At their best, Britain’s irreverent tabloids report without fear or favor, aggressively holding the political elite to account. But they can be selective about whom they hound — and boastful. In 1992, when the Conservative Party unexpectedly beat Labour after a ferocious anti-Labour campaign in The Sun, the paper’s headline proclaimed, “It’s the Sun Wot Won It.”

In June, barely an hour after the referendum results were in, he struck a very different tone in a text message to a journalist at The Guardian: “So much for the waning power of the print media.”

Image

A newspaper shop in Dagenham, England.CreditJosé Sarmento Matos for The New York Times

Mirroring or Inciting Readers?

According to a recent analysis by the Media Reform Coalition, a pressure group, senior executives from Murdoch-owned companies met with the prime minister or the chancellor of the Exchequer 10 times in the year ended in September, when the study was completed — more than any other media organization in the country.

Yet The Sun sells only 1.6 million copies today (more than 80 percent of them outside London and the country’s wealthy southeast), down from a peak of 4.7 million in the mid-1990s. It lost more than £60 million, about $75 million, last year.

Why are politicians still so scared?

“It’s a fact that print newspapers, national newspapers, set the agenda here far more effectively than broadcasters, who are essentially a reactive medium,” said Mr. Gallagher, noting that newspapers can keep hitting certain issues.

“So if you as a newspaper are making much of the fact that all our laws are made in Europe, eventually that permeates the national consciousness,” he said.

Britain makes many of its own laws, of course. But it is an interesting choice of example. A more obvious one might have been immigration.

Image

Front-page splashes in The Daily Mail showing hostility toward migrants in the weeks leading up to last year’s “Brexit” vote.

Research by a former Times journalist, Liz Gerard, showed that tabloids pounded the immigration issue, with at least 30 hostile front-page splashes in The Daily Mail in the six months leading up to the referendum, and 15 in The Sun. The headlines — “Britain’s Wide Open Borders” The Daily Mail shouted — often tended toward histrionic. The Sun insinuated that child refugees arriving in Britain were lying about their ages and should have dental X-rays.

“Tell Us the Tooth,” the headline read.

A week earlier, I had met Kelvin MacKenzie, a former Sun editor and a columnist who was subsequently suspended for referring to a mixed-race soccer star as a “gorilla.” He said that the paper still reflected the “beating heart of Britain,” and that Brexit was won on immigration “by a thousand miles.”

Mr. Gallagher was more nuanced.

Image

The Sun newsroom is the only one in the building with direct access to the management floor.CreditJosé Sarmento Matos for The New York Times

“It was about a combination of migration, sovereignty under the broad umbrella of taking back control, and a sense that, as a country, we were no longer able to control our destiny,” he said.

The Sun, which recruits some employees straight out of high school, has an almost personal relationship with its readers, like that with a trusted friend down at the pub.

Other newspapers in Mr. Murdoch’s group supported remaining in the European Union, Mr. Gallagher noted, reflecting the views of their readers. Among that group was the Scottish edition of The Sun, which like Scottish voters backed Remain.

“It makes commercial sense,” said Mr. Gallagher. But he has also been a passionate euroskeptic for years.

“Undoubtedly, we fed people’s enthusiasm,” Mr. Gallagher said. But, he added, “the idea that we can somehow drag otherwise unwilling readers to a point of view that they don’t otherwise have is delusional.”

Roy Greenslade, a former features editor at The Sun, disagreed. In 1975, he said, the last time Britain held a referendum on membership in what was then the European Economic Community, and a time when polls suggested that most people wanted to leave, all papers (except the communist Morning Star) campaigned to stay. People voted to stay.

“Every populist editor will tell you, ‘We are merely reflecting and articulating the public views,’ ” said Mr. Greenslade, now a journalism professor at City University of London. “But they are publishing inaccuracies and distortions which help people to feel the way they’re feeling.”

Image

The view of London from The Sun’s offices.CreditJosé Sarmento Matos for The New York Times

‘Creative’ Headlines

It was 2:30 p.m., and Mr. Gallagher had already mocked up Pages 3-29 of the next day’s paper. He expected the front page to lead with the funeral of the police officer who had been killed in the recent Westminster terrorist attack. The officer’s widow and child would appear in public for the first time, which could make for “emotional” pictures, the editor said. But the decision would not be made until the daily 5 p.m. Page 1 conference.

Mr. Gallagher said he had once attended a news meeting at The New York Times. He was not impressed.

“I was shocked at how threadbare and how little actual discussion there was in the meeting,” he said. “There was no energy, there was no creativity. It could not have been more desultory and perfunctory, the discussion. It was awful.”

Britain’s tabloids pride themselves on their “creativity.” Perhaps The Sun’s most brazen front-page claim last year was “Queen Backs Brexit,” a headline later ruled misleading by Britain’s press regulator.

The Sun’s unchallenged king of “creative” headlines is Mr. MacKenzie, once the paper’s editor. Some of the meeting rooms are named after his most memorable creations, like “Gotcha,” his take on the sinking of an Argentine warship during the Falklands War that killed more than 300 people, and “Up Yours Delors,” telling Jacques Delors, then the president of the European Commission, where to stick a proposed new European currency.

I had met Mr. MacKenzie a week earlier to ask about those headlines. “Your front pages were sometimes funny and sometimes outrageous,” I began, at which point he interrupted and said, “And sometimes untrue!”

Wow.

I asked what headline he would like to see in the paper were he still in charge.

“I think the fake news headline that would give this country the most joy,” he replied cheerfully, “would be ‘Jeremy Corbyn Knifed to Death by an Asylum Seeker.’ ”

Mr. Corbyn is the leader of the Labour Party. Mr. MacKenzie’s fake news headline inevitably brought to mind the murder of Jo Cox, a pro-Remain Labour lawmaker who was killed by a man with far-right leanings a week before the referendum. Her death prompted a lot of soul-searching over whether the tone of the campaign had encouraged hate crimes.

(The next morning, I got a text message from Mr. MacKenzie: “Hi Katrin, Can you change that perfect headline from ‘Jeremy Corbyn knifed to death by asylum seeker’ to ‘Jeremy Corbyn Defrauded by Asylum Seeker.’ In the light of Jo Cox murder mine is in tol poor taste.”)

Mr. Gallagher left for his “inner-sanctum meeting” but promised to brief me later. I wandered up to the canteen on the 14th floor.

The servers were all Southern European. An assistant chef strolling by said the kitchen staff was mostly foreign-born, too. He could not imagine how they would staff the kitchen after Brexit. “It will be chaos,” he said.

It was 5:40 p.m. The lineup for the next day’s front page had been decided. The photos of the police officer’s funeral were found “unsatisfactory” for a full-page splash. A soccer player, Ross Barkley, who had been beaten up in a nightclub and who would later become the subject of Mr. MacKenzie’s gorilla column, was the main story. The headline: “Barkley’s Spank.”

My time was up. Mr. Gallagher had kept his poker face all afternoon. The only time I thought he had shifted in his seat was when I asked about his children’s views on Brexit. Two were too young to vote, he said, but his oldest, who is 21, cast her ballot for Remain.

A version of this article appears in print on , on Page A1 of the New York edition with the headline: Did Tabloids Cause ‘Brexit’? It’s Covered With Inky Fingerprints. Order Reprints | Today’s Paper | Subscribe