LONDON — Beset by a widening phone-hacking scandal, media mogul Rupert Murdoch pulled the plug Thursday on his News of the World, Britain’s best-selling weekly tabloid newspaper, which will shut down after publishing Sunday’s issue.

In a surprise announcement to the paper’s staff, James Murdoch, a top executive of the tabloid’s parent company and son of Rupert Murdoch, said the July 10 paper “will be the last issue of the News of the World.”

The feisty, hugely profitable paper, which has been continuously published for 168 years, “has a proud history of fighting crime, exposing wrong-doing and regularly setting the news agenda for the nation,” James Murdoch said. But those attributes “have been sullied by behavior that was wrong,” he said. “Indeed, if recent allegations are true, it was inhuman and has no place in our company. The News of the World is in the business of holding others to account. But it failed when it came to itself.”

Referring to the phone-hacking scandal, the younger Murdoch, deputy chief operating officer of his father’s News Corp., said the newspaper “failed to get to the bottom of repeated wrongdoing that occurred without conscience or legitimate purpose.” He added, “Wrongdoers turned a good newsroom bad and this was not fully understood or adequately pursued.” He pledged that “those who acted wrongly will have to face the consequences.”

In an act of penance, the final issue Sunday will carry no commercial advertisements, and all revenue “will go to good causes,” James Murdoch told the tabloid’s staff in a memo.

The scandal has driven away advertisers, alienated readers and prompted outraged Britons to launch Internet campaigns to boycott the paper.

It was not immediately clear whether News Corp. would put out a new Sunday paper to replace the News of the World, which had been selling 2.6 million copies a week. A spokeswoman for News International, a News Corp. subsidiary that publishes the News of the World and other papers, said it was “not true at the moment” that the company has any plans to fill the void by issuing the tabloid’s sister publication, the Sun, on Sundays. The Sun currently publishes Monday through Saturday.

News International is Britain’s biggest newspaper publisher, with the News of the World one of its four major titles. The others are the daily Times of London, the Sunday Times and the tabloid Sun.

The stunning closure of Britain’s most popular Sunday paper comes as new allegations about the tabloid’s conduct have come to light during the past week. In the latest development, relatives of British servicemen who died in Iraq and Afghanistan may have had their phones hacked by the paper, which is also accused of intercepting voice mails of the families of terror victims and of a slain 13-year-old girl, the Daily Telegraph reported Thursday.

The Daily Telegraph said that “personal details of the families of servicemen who died on the front line” were discovered in records kept by Glenn Mulcaire, a private investigator who worked for News of the World.

The revelation raised the possibility that the relatives’ phones had been hacked. Earlier media reports accused the tabloid of intercepting the voice mails of celebrities, aides to the royal family, the slain teen and relatives of people killed in 2005 terrorist attacks on London’s transportation system.

On Wednesday, Prime Minister David Cameron called for a public inquiry into the phone-hacking scandal, telling the House of Commons, “I feel so appalled by what has happened; murder victims, terrorist victims who have had their phones hacked is quite disgraceful. That is why it is important that there is a full police investigation with all the powers they need.”

Cameron also said there was a need to “improve the ethics and morals of the press in this country.”

Rebekah Brooks, a former editor of News of the World and chief executive of Murdoch’s News International newspaper division, has faced growing pressure to resign. Ed Miliband, the leader of Britain’s opposition Labor Party, said she should “take responsibility and stand down.”

Cameron, who has not called for Brooks to quit, has been accused of being too close to News International, whose newspapers vigorously backed his Conservative Party in the 2010 general election that brought him to power. Cameron reportedly spent last Christmas with Brooks.

John Lloyd, director of journalism at the Reuters Institute for the Study of Journalism at the University of Oxford, said that Cameron is in an awkward position regarding the scandal, as News International “inspires in any prime minister a certain amount of fear.

“Even though it’s now in deep trouble, it still packs a big punch,” Lloyd said. But he also said that, as a result of the scandal, he expects greater restrictions on what British tabloids can publish.

Cameron’s judgment has also been called into question with new claims this week that Andy Coulson, his former director of communications, approved payments of tens of thousands of pounds to police when he was the editor of News of the World. Coulson quit his government job in January; although he denied any knowledge of illegal activity at the paper, he said the ongoing scandal was too much of a distraction.

Rupert Murdoch took the highly unusual step on Wednesday of issuing a statement publicly backing Brooks while describing the allegations leveled at the tabloid as “deplorable and unacceptable.”

Britons have expressed shock and outrage over the allegations of widespread phone hacking that may have included Graham Foulkes, whose son David died in the 2005 bombings in London.

Foulkes told the BBC that police contacted him on Tuesday night to tell him that his phone numbers, some of which were unlisted, were found in records kept by Mulcaire and seized by police.

“Janet and I were obviously having very intimate personal phone calls with friends and family. To think that when you’re at the lowest time in life that somebody, for the sake of a cheap story, is maybe listening to you, it’s just beyond words,” he said.

A number of companies, including Ford Motor Co., have pulled their advertising from News of the World to show their disapproval of the alleged hacking, and others say they are considering it.

Farhi reported from Washington. Staff writer William Branigin in Washington and special correspondent Eliza Mackintosh in London contributed to this report.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.

To pause and restart automatic updates, click "Live" or "Paused". If paused, you'll be notified of the number of additional comments that have come in.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.