The Wall Street Journal on Tuesday replaced its top editor, Gerard Baker, whose tenure at the financial newspaper had been beset by internal criticism of his leadership in covering the rise of Donald Trump’s political career.

The newspaper said Baker, who ran the Journal’s newsroom for the past five years, will take a new position as its editor at large and return to writing commentaries. He will also host a program on Fox Business Network, which is owned by a company controlled by Rupert Murdoch, the principal owner of the Journal’s parent company, News Corp.

Baker has been a sometimes controversial figure among his own journalists, with some privately grumbling that he was too soft on Trump’s candidacy and presidency.

His departure was a surprise in the newsroom. Several reporters said they learned that he was leaving from a news release issued by News Corp. The company did not make Baker available for an interview.

Matt Murray, the Journal’s executive editor, or second-in-command, will assume Baker’s job on Monday — a swift transition that hinted strongly at a summary decision to remove Baker. People at News Corp. said, however, that the decision to step down was Baker’s alone.

Nevertheless, executives of News Corp. and the Journal’s immediate parent, Dow Jones & Co., praised Baker in a news release announcing his departure. Baker, in turn, expressed his gratitude to Murdoch, his son Lachlan and News Corp. chief executive Robert Thomson for “the extraordinary opportunity” to run the Journal.

Murdoch, whose media empire includes Fox News Channel, is a longtime Trump ally, and some of the Journal’s reporters have suggested that Baker’s approach to covering Trump has been influenced by Murdoch’s support of the president. They have said he has played down stories that were damaging to Trump, though he hasn’t killed any outright.

Dissatisfaction with Baker’s caution on the Trump story has played a role in the departure of some of the Journal’s top political and investigative reporters over the past two years; 10 former Journal reporters have joined The Washington Post during that time. Three of them — Beth Reinhard, Devlin Barrett and Adam Entous — were among the teams of Post journalists that won Pulitzer Prizes for national and investigative reporting in April (Entous recently left The Post for the New Yorker.)

However, more recently the Journal has produced a series of scoops about Trump’s lawyer, Michael Cohen, and his payments of hush money just before the 2016 election to porn star Stormy Daniels, who has alleged that she had an affair with Trump in 2006.

In addition to breaking the Daniels story in January, the Journal has since reported that Cohen used pseudonyms and funneled the payment through a private Delaware company he established; that a bank had flagged Cohen’s payment as suspicious; and that Cohen negotiated a $1.6 million payment to the alleged mistress of GOP fundraiser Elliott Broidy, a revelation that prompted Broidy’s resignation as Republican National Committee deputy fundraising chair.

Despite the scoops, Journal reporters in New York and Washington have said morale at the paper remained low under Baker. They have been particularly chagrined by his circumspect attitude toward special counsel Robert S. Mueller III’s investigation of potential ties between Trump’s campaign and Russian operatives during the campaign. In some staff meetings, “he expressed a level of skepticism about several lines of reporting that went beyond healthy skepticism and sounded a lot like talking points,” said one reporter.

But the British-born editor has pushed back on criticism of his tenure. He told his staff last year that his desire was to be objective, not “oppositional” in covering the Trump administration. He acknowledged at the time that Trump had demonstrated an “extraordinary disregard for facts.”

Murdoch appointed Baker, a former conservative columnist, as the Journal’s editor in 2013.

Murray is a 24-year veteran of the newspaper. Before becoming executive editor, he served as deputy editor in chief. He joined Dow Jones in 1994 as a reporter for the Pittsburgh bureau and later wrote about the banking industry for the Journal’s Money & Investing section.