The Justice Department will not prosecute Rupert Murdoch’s News Corporation or 21st Century Fox over voice mail interceptions and payments to public officials, actions done by their journalists in London, the companies said on Monday.

“We are grateful that this matter has been concluded and acknowledge the fairness and professionalism of the Department of Justice throughout this investigation,” Gerson A. Zweifach, general counsel for the companies, said in a statement Monday afternoon.

Investigations in Britain and the United States began in 2011 after a series of allegations that journalists at Mr. Murdoch’s British tabloid News of the World had intercepted the voice mail messages of celebrities, politicians and other newsmakers, in an effort to get scoops.

British police and the United States Department of Justice began inquiries. Mr. Murdoch in 2011 shuttered News of the World — at the time, one of the best-selling newspapers in the world — and was forced to appear before a panel of British lawmakers. The company settled hundreds of civil claims and incurred hundreds of millions of dollars in legal and other costs. Some senior journalists went to jail