Andy Lack, who has served as chairman of NBC News and MSNBC for five years after a longtime affiliation with the company, is stepping down from his job amid a corporate restructuring.

Lack “has decided to step down and will transition out of the company at the end of the month,” according to a statement from NBC. The move came months ahead of schedule, according to people familiar with the deliberations, who said Lack had planned to step down after the 2020 presidential election.

The announcement ended Lack’s lengthy tenure at NBC, one split into two tours and marked by significant upheaval within his ranks, particularly in his most recent time at the network, which included the firing of “Today” anchor Matt Lauer for sexual misconduct.

The news came the same day NBCUniversal announced it was reorganizing its news and entertainment divisions. Cesar Conde, who has overseen Spanish-language Telemundo and NBC’s international organization, will now serve in the newly created role of chairman of NBCUniversal News Group, which includes NBC News, CNBC and MSNBC.

It’s the first big executive shuffle by CEO Jeff Shell since he took over for Steve Burke earlier this year. Lack’s direct reports, who included NBC News President Noah Oppenheim and MSNBC President Phil Griffin, will now report to Conde, along with CNBC Chairman Mark Hoffman.

The move comes now in part because Shell wanted to make his imprint on the company and is facing intense budget pressure during economic fallout from the novel coronavirus, according to NBCUniversal insiders who spoke on the condition of anonymity to discuss internal matters.

That fallout had already forced NBC to place on hold an ambitious plan to launch a news service with Sky News, which NBC parent Comcast gained control of in 2018.

Meanwhile, two former NBC journalists said late Monday they had spoken to investigators with the New York State Attorney General’s Office exploring allegations of sexual harassment and discrimination at NBC News.

Lack, 72, a veteran TV news producer, first joined NBC as news division president in 1993 after a long career at CBS and oversaw a surge in the ratings for “NBC Nightly News” and the “Today” show. He left the network for a series of other corporate media jobs a decade later.

Since returning to the network as chairman of its news division in 2015, Lack oversaw a resurgence of some of NBC’s marquee shows, such as “Today,” and urged NBC News to fully embrace its cable partner MSNBC, pushing anchors from both divisions to work together.

He also oversaw high-profile controversies and missteps: anchor Brian Williams’s suspension and demotion for exaggerating his reporting exploits; the network’s apparent delay during the 2016 presidential campaign of the “Access Hollywood” recording from 2005 in which Donald Trump bragged about groping women; “Today” host Matt Lauer’s firing for sexual misconduct in 2017; and the signing of Fox News host Megyn Kelly to a huge contract that resulted in a low-rated talk show and her eventual departure from NBC.

Lack was also in charge when NBC parted ways three years ago with investigative journalist Ronan Farrow, who subsequently won a Pulitzer for the New Yorker magazine with his groundbreaking story revealing Hollywood producer Harvey Weinstein as a repeat sexual offender and harasser.

Lack had been the subject of growing criticism after Farrow published a book last year accusing Lack and other NBC News brass of impeding his investigation as a way to protect Lack’s close friend Lauer, whose pattern of sexual misconduct had not yet become public. NBC News denied killing Farrow’s story.

“It disappoints me to say that even with passage of time, Farrow’s account has become neither more accurate, nor more respectful of the dedicated colleagues he worked with here at NBC News,” Lack wrote in a memo last year.

Some of the criticism came from inside the building. MSNBC star Rachel Maddow took her bosses to task last year, declaring on-air that network employees were disappointed with the handling of Farrow’s Weinstein story. She also called for an outside party to investigate the claims related to Lauer. The “amount of consternation this has caused among the rank-and-file people who work here would be almost impossible for me to overstate,” she said.

One of the former NBC staffers in contact with state investigators was Rich McHugh, a producer who worked with Farrow, who said he spoke to them last fall. The other was Linda Vester, a former correspondent who has said that Tom Brokaw made a sexual advance towards her two decades ago. Vester said the investigators asked her in January if she knew if Lack was involved in any effort to have a story on her allegations against Brokaw killed.

An NBCUniversal spokesperson said the company was unaware of any inquiry. A spokesperson for the state atttorney general’s office could not be reached late Monday.

For Lack, the adverse publicity generated by these episodes has been counterbalanced by NBC News’s ratings and financial performance during his tenure, his supporters at the network say.

A week before news of his departure, Lack wrote an op-ed praising the news media’s handling of the coronavirus pandemic amid President Trump’s verbal attacks on journalists during briefings. The piece was in the works for at least a week, according to people familiar with its drafting, and was written as a fond farewell to the job.

Reflecting on his career in the news business, he wrote, “in this moment, it feels more like a calling.”

This story, first published at 4 p.m., has been updated.