Alex Trebek, the longtime host of "Jeopardy!," announced he has stage 4 pancreatic cancer.

The 78-year-old appeared to be in good spirits as he revealed the diagnosis on the game show's YouTube channel Wednesday, adding, "I wanted to be the one to pass along this information."

"Just like 50,000 other people in the United States each year, this week I was diagnosed with stage 4 pancreatic cancer," he said. "Now normally, the prognosis for this is not very encouraging, but I’m going to fight this, and I’m going to keep working."

Celeb reaction: Pat Sajak, Chris Harrison, more rally around Alex Trebek after cancer diagnosis

Related: Alex Trebek reveals his picks for the next 'Jeopardy!' host

Trebek vowed to take on the disease with "with the love and support of my family and friends and with the help of your prayers."

"I plan to beat the low survival-rate statistics for this disease," he said. "Truth told, I have to! Because under the terms of my contract, I have to host 'Jeopardy!' for three more years!"

Although Trebek took medical leave from the show in January 2018, following surgery to remove blood clots from his brain after a fall, and hinted at retirement during an interview with TMZ's Harvey Levin on Fox News Channel's "OBJECTified" in July 2018, the beloved host put viewers at ease by renewing his contract through 2022.

Trebek has been at the helm of "Jeopardy!" since 1984, setting a Guinness World Record in June 2014 for the most episodes – 6,829 – of a game show hosted. More than 7,000 episodes have aired to date.

He has won five Daytime Emmy Awards for outstanding game show host over the course of his career, earning an unprecedented 28 nominations, more than any other host.

Trebek continued: "So help me. Keep the faith and we’ll win. We’ll get it done."

The legendary game-show host decided to share the news himself to follow his "longtime policy of being open and transparent with our 'Jeopardy!' fan base."

"I also wanted to prevent you from reading or hearing some overblown or inaccurate reports regarding my health," he said.

Contributing: Sara Moniuszko

Related: Alex Trebek takes medical leave from 'Jeopardy!' after fall requires blood clot surgery

More: Alex Trebek hints at retiring from 'Jeopardy!' soon, names potential replacements