David Bishop spends the school day as a mild-mannered custodian, but before the final bell rings, he grabs his chess boards and pieces and begins his second role.

"The Queen’s Gambit" is playing out in real life in Maine, where this custodian is coaching his schools' chess teams to acclaim.

Bishop, a part-time chess coach and full-time custodian, led his elementary and middle school teams to state championship titles this year, drawing comparisons to the Netflix series about a chess prodigy inspired by a janitor.

Some of his players are good enough to beat their coach, proudly declaring "checkmate!"

"Initially, it was humiliating and demoralizing, but it didn’t take long for me to realize that’s a good thing. They're getting stronger," the 61-year-old said.

Nationwide, chess is riding a new wave of popularity, and it's not just because of the popular Netflix mini series based on the 1983 book by Walter Tevis.

During the pandemic, a growing number of kids forced to stay at home for extended periods turned to Chess.com to relieve their boredom. The website and app allows visitors to learn the game, to play against each other or against a computer, and to get chess news.

The website had 1.5 million daily users in February 2020 — just before the pandemic hit the U.S. in full force — but it grew to 4.5 million by the end of 2020. It had hit 10 million by January of this year. The total number of registered users has nearly quadrupled to 123 million, the company said.

Chess fans are also watching videos of grandmasters teaching strategies and livestreams of high-profile chess players facing off.

"What we are seeing is an unprecedented period of boom, like nothing before," said Leon Watson, spokesperson for Chess.com. "It definitely feels like chess is having a moment."

MAINE GOV. MILLS PROPOSES $887M SUPPLEMENTAL BUDGET

In Hampden, Bishop’s coaching success followed a happy twist of fate.

He was burned out from his job in the telecommunications industry and took an early retirement package at age 50. He was exploring new opportunities in the field — and not having much luck — when someone told him about a school custodial job. He figured it would be mean less stress.

He didn't even know there was a chess club until after he'd begun work in 2013. He began volunteering with the chess club at Reeds Brook Middle School, and later at George B. Weatherbee Elementary School, as well.

Bishop learned chess the old-fashioned way, with a family chessboard and by experimenting with the board pieces: pawns, bishops, knights, rooks, queens and kings. He played with his brothers, sometimes in the family’s barn, learning the moves to checkmate his opponent's king, the object of the game. At age 10, he followed with keen interest the match in which American grandmaster Bobby Fischer defeated the Soviet Union's Boris Spassky in 1972.

While Bishop enjoyed chess and was good at it, he didn’t join his high school chess club, worrying he would be typecast as a nerd. He regrets that now.

These days, thanks to its growing appeal, those stereotypes no longer apply.

Custodian and chess coach David Bishop

Custodian and chess coach David Bishop challenges a student during after-school practice, on April 25, 2023, in Hampden, Maine.  (AP Photo/Robert F. Bukaty)

On a recent day, there was a buzz in the air at the Reeds Brook Middle School library where the chess club meets. Bishop's team had just represented Maine at the the national championships in Texas, and they came in eighth place out of 52 teams. The elementary school team competes this weekend in its national championships in Maryland.

The students quickly tossed their backpacks aside, sat down at library tables and launched into matches. Those who weren’t actively playing watched others’ moves intently.

Eli Marquis, 12, said the chess players are constantly learning new skills and tactics — like opening and closing moves — allowing them to improve and ensuring they don’t get bored.

"You can never run out of things to learn and to practice and to do, and you can just keep on getting better as long as you practice. There’s no end to it. Really," he said.

MAINE POISED TO ALLOW ABORTIONS AFTER FETAL VIABILITY WITH MEDICAL REFERRAL

Eddie LaRochelle, 13, compared chess to other competitive team sports. A strong work ethic and practice improve individual skills, and those individuals work together to achieve victory.

"You don’t need to work out every single day in the gym. To get stronger, you can exercise your brain with puzzles, chess and other things," he said.

Lessons from the chess board often carry into life.

Team members said chess has taught them to think ahead, be strategic and consider the ramifications of decisions. And it helps with keeping on task and staying organized.

"Chess is so good for them, and most of them don’t know it," their coach said. "They’re just playing chess, but it's like a workout for the brain."

Bishop understands comparisons to the janitor in "The Queen’s Gambit" — William Shaibel, played by actor Bill Camp — and he thinks it’s an entertaining series. The chess play is accurate and exciting, he said.

Camp, the actor, has heard of the team's success and hopes to pay a visit to the school to offer his congratulations. He had high praise for Bishop.

"What he's doing is about as noble as one can do – he’s a teacher," Camp said from Los Angeles. "He's doing the greatest service."

Unlike the Netflix series's janitor, Bishop is helping not just one girl in an orphanage, but dozens of kids of all skill levels and socioeconomic backgrounds.

His one worry is that there aren’t as many girls taking up chess.

CLICK HERE TO GET THE FOX NEWS APP

Chess continues to be dominated by men and boys from the top level of grandmasters down to the grade school level. There’s only one female on his middle school champion team right now, but he's hoping to change that by getting kids hooked at earlier ages, starting in kindergarten.

For now, Bishop looks forward to seeing how far his teams can go. As the teams get better, he’s getting used to losing chess matches more frequently.

Riley Richardson, who placed 14th out of 386 competitors at the nationals, said the first time he beat his coach, he thought Bishop was letting him win. But now, he has beaten his coach a few times.

He's watching for vulnerabilities.

"A while ago, I actually beat him because I just started learning his weaknesses," Richardson said. That weakness? He smiled and said: "Sometimes, he’s overthinking."