New York(CNN Business) Chris Matthews, one of America's best-known political talk show hosts, is retiring from MSNBC, effective immediately, after a string of recent controversies on and off the air.

Matthews made the announcement on Monday night's "Hardball," the cable news show he has hosted for more than 20 years.

Monday was his final broadcast. "Obviously, this isn't for lack of interest in politics," Matthews said, indicating that the decision was not entirely his.

Matthews was told by management to step down, said a person with knowledge of the situation, who characterized it as a firing that was masked as a retirement announcement.

A different source disputed that and said it was "truly a mutual decision."

Matthews mentioned a "conversation" with management during his farewell on Monday evening.

"After a conversation with MSNBC, I decided tonight will be my last 'Hardball,' so let me tell you why," he said. "The younger generation's out there ready to take the reins. We see them in politics, in media, in fighting for their causes. They're improving the workplace."

Matthews, 74, alluded to claims of inappropriate conduct that have trailed him for years, and resurfaced last Friday when GQ columnist Laura Bassett accused Matthews of making sexist remarks when she was a guest on "Hardball" in 2016.

Bassett recalled Matthews saying things like "Why haven't I fallen in love with you yet?" and other "gross and inappropriate" comments.

Matthews did not specifically mention Bassett but that was the context in which Matthews' made his remarks on Monday night about workplaces implementing "better standards than we grew up with — fair standards. A lot of it has to do with how we talk to each other."

"Compliments on a woman's appearance that some men, including me, might have once incorrectly thought were okay, were never okay. Not then and certainly not today," Matthews said. "And for making such comments in the past, I'm sorry."

Bassett responded to Matthews' announcement by saying, in a tweet, "All I gotta say is... it's about time."

Matthews thanked his viewers and producers and then signed off. After a commercial break, the program resumed with fill-in host Steve Kornacki.

"I'm sure you're still absorbing that, and I am too," he said. "Chris Matthews is a giant. He's a legend, it's been an honor for me to work with him."

Kornacki tossed to another set of commercials, then hosted for the rest of the hour.

MSNBC did not immediately name a replacement for Matthews.

And it won't be easy to do so. Matthews has been a staple of MSNBC's political coverage almost since the cable channel launched in the mid 1990s. Through all of the channel's changes and rebrandings, he has been a familiar face.

Chris Matthews in the spin room during the Democratic Party presidential debates in June 2019 in Miami.

But he has been in the news for all the wrong reasons lately — for likening the Bernie Sanders campaign to the Nazis, for misidentifying an African American politician, and for allegedly making sexist comments to Bassett.

When Sanders took an early lead in the Nevada caucuses last month, Matthews likened the moment to Nazi Germany invading France during World War II. Aides to Sanders, who is Jewish, expressed shock at the analogy.

Matthews' gaffes have also caused embarrassment. Last Friday night, Matthews mixed up Jaime Harrison, a Democrat running for his party's nomination to challenge Sen. Lindsey Graham, with Graham's Republican Senate colleague Tim Scott. Both Harrison and Scott are African American. "Big mistake," he said, when his guests awkwardly corrected him.

Matthews had been expected to retire after the 2020 election cycle, according to two people with knowledge of the situation.

One of the people said that Matthews had been in conversation with MSNBC executives about his retirement date for a period of months.

But the talks "accelerated," this person said, after the recent controversies.

Matthews was noticeably absent during MSNBC's coverage of the South Carolina primary on Saturday.

Guests on "Hardball" reacted to Matthews' abrupt departure on Monday night.

María Teresa Kumar, the CEO of Voto Latino, thanked him on the air for giving her a shot at national TV exposure during the 2008 primary season.

"I will forever be grateful to him," she said. "I wish him the best."

Kornacki acknowledged that "this is a very unusual and very difficult circumstance for all of us."

Another of Kornacki's guests, Eugene Scott of the Washington Post, said it's "really important and valuable" for Matthews to "acknowledge that a generational shift is happening, a new day has come."

At the end of the hour, Kornacki paid tribute to Matthews' legacy on television, his "deep patriotism," and passion for politics.

"Of all the television personalities I've ever known as a viewer, Chris is the most human," Kornacki said, "and I say that as one of the highest compliments I can pay to someone. I'm sorry — I think you got him, and I think he got you. And all of us are going to miss him."