This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

NEW YORK (AP) — Ellen DeGeneres is calling time on her long-running talk show.

The daytime host, who has seen a ratings hit after allegations of running a toxic workplace, has decided that the upcoming 19th season will be the last, ending in 2022. It coincides with the end of her contract.

“You may wonder why I’ve decided to end after 19 seasons. The truth is, I always trust my instincts. My instinct told me it’s time,” a tearful DeGeneres said Wednesday during a taping for Thursday’s show.

“I promise you that we’re going to have a fantastic final season. It will be a season where I truly get to say, ‘Thank You. Thank you all.’ Every day will be a celebration,” she said.

She used humor to lighten the mood and the message.

“In 1997, I knew it was time to come out on my sitcom and live my truth,” DeGeneres said, recalling a vivid, inspiring dream in which a bird escaped its cage because it had to be free.

“Recently, I had a dream that a bird, beautiful bird with bright red feathers, came to my window and whispered, ‘You can still do stuff on Netflix,’” a deadpan DeGeneres said, drawing laughs from the virtual studio audience.

“The Ellen DeGeneres Show,” which started airing in 2003 and is distributed by Warner Bros., has a mix of dancing, games and giveaways along with A-list celebrities. But the host, who built her brand on the motto “Be Kind,” opened season 18 in September with a lengthy apology.

Three of the show’s producers exited over the summer amid allegations of a dysfunctional workplace that harbored misbehavior, including sexual misconduct and racially insensitive remarks.

While the allegations were “very hurtful to me,” they didn’t influence her decision to leave the show, DeGeneres told The Hollywood Reporter. “I wouldn’t have come back this season” if they had, she said.

“Although all good things must come to an end, you still have hope that the truly great things never will,” Mike Darnell, president of unscripted TV for Warner Bros., said in a statement Wednesday. “It was and is an indelible piece of the television landscape, and it will be sorely missed.”

Nielsen data shows “The Ellen DeGeneres Show” viewership dropped by 1.1 million people this season, from 2.6 million viewers to 1.5 million viewers.

DeGeneres was the recipient of the Kennedy Center’s Mark Twain Prize for American Humor in 2015 and the Presidential Medal of Freedom under Barack Obama in 2016. In addition to her talk show, she has had a hand in Fox’s “The Masked Dancer,” NBC’s “Ellen’s Game of Games” and HBO Max’s “Ellen’s Next Great Designer.”

DeGeneres’ scripted TV show “Ellen” became a historic landmark in TV history in the 1990s when her character came out as gay.