NEW YORK (AP) — The New York Times has named Joseph Kahn as its new executive editor, replacing Dean Baquet with his current second-in-command to lead the news organization as it rapidly transforms itself in the digital age.

Kahn, who has been managing editor at the Times since 2016, will take over on June 14. Baquet, who at 65 has reached the traditional retirement age for the Times’ top newsroom leader, will remain at the newspaper in a capacity that will be announced later.

Kahn, 57, joined the Times in 1998 from The Wall Street Journal. He previously served as the newspaper’s Beijing bureau chief, worked as an economics reporter and led its international desk, which won six Pulitzer Prizes under his stewardship.

“Joe brings impeccable news judgment, a sophisticated understanding of the forces shaping the world and a long track record of helping journalists produce their most ambitious and courageous work,” said A.G. Sulzberger, the Times’ publisher and chairman, in a memo to staff members Tuesday. “We couldn’t ask for a better leader for our newsroom amid a historic convergence of events.”

Kahn was not made available for comment.

His appointment wasn’t a surprise to many who follow such moves, and Sulzberger said those who will interpret it as a sign of confidence in the Times’ current path are correct.

The organization has made a digital transformation with startling speed: Its roughly 10 million digital subscriptions increased 10-fold since 2014. The Times produces a popular podcast, “The Daily,” started a video investigative unit,bought the sports website The Athleticand now even owns the popular puzzle Wordle.

It’s hard to imagine now, but when Baquet took over as executive editor in 2014, there was doubt about the Times’ future, said Tom Rosenstiel, a journalism professor at the University of Maryland. Now, it is a better paper than ever, with its podcasts, newsletters, digital storytelling and investigative reporting serving as a roadmap for others, he said.

“Most people don’t see it,” Rosenstiel said. “It’s as if the car still has the same name on the back and the same goals for the driver. But everything under the hood is entirely new. They have converted the machine from gas to electric before anyone else.”

Journalistically, the Times has taken big swings with groundbreaking #MeToo investigations, an exhaustive probe of former President Donald Trump’s finances and the 1619 Project, about the nation’s racial legacy.

There have been missteps. The Times had to return a Peabody Award for its 2018 podcast, “Caliphate,” after determining it could no longer vouch for the claims of a source. Editorial page editor James Bennet resigned after giving the green light to a 2020 opinion piece where U.S. Sen. Tom Cotton advocated using federal troops to quell racial unrest, an episode that showed the willingness of younger journalists at the newspaper to speak out.

Leading a new generation will be one of Kahn’s challenges, said Rick Edmonds, media business analyst at the Poynter Institute, a journalism think tank. Earlier this month, Baquet sent a memo to staff members urging them to cut back on Twitter usage.

The Times is frequently a target for conservatives, a trend supercharged by Trump’s “fake news” label. Some liberals believe it should have been tougher on Trump, and blamed Baquet.

Former Washington Post Executive Editor Marty Baron said that he and Baquet often compared notes about the challenge of leading newsrooms through difficult times and venomous attacks.

“Throughout, Dean has been the steady hand a great news organization needed, retaining his warmth and charm while showing himself to be an editor with a spine of steel,” Baron said Tuesday. “Journalism and the country are better for his leadership.”

The Times hasn’t been the only newsroom to face regime change. Last year The Washington Post named Sally Buzbee as its executive editor earlier this year, the Los Angeles Times hired Kevin Merida in the same role and The Associated Press named Julie Pace as its newsroom leader. Chris Licht is about to succeed Jeff Zucker as CNN’s chief, while ABC News, CBS News and MSNBC have new leaders.

Unlike some of the others, and perhaps befitting of what is essentially a family-run institution, the Times’ tradition is to promote its top leader from within. Kahn fits that bill.

Kahn received an endorsement from Baquet, with Sulzberger noting in his memo that Baquet believed Kahn was more prepared than any editor he’s ever seen to take over a newsroom with the Times’ complexity and ambition.

Kahn was president of the Harvard Crimson in college, following Zucker in that job. He began work at The Dallas Morning News but set his sights on China, and was working there when the Journal hired him in 1993. He “knows more about China than almost anyone,” said Jill Abramson, Baquet’s predecessor as Times’ executive editor.

“He is a lovely man — modest and scrupulous — and was always a great colleague,” Abramson said.

She said he’s well-equipped to lead in the digital age, noting that Kahn was behind the creation of the Times’ Chinese-language edition. As managing editor, he’s led the Times push into becoming a digital-first operation, championed different forms of storytelling and led efforts to make the newsroom more diverse and inclusive, Sulzberger said.