Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

GLEN JEAN, W.Va. — President Donald Trump on Monday jokingly threatened during a speech to thousands of Boy Scouts to fire his health secretary if a crucial vote to repeal "Obamacare" fails.

During a speech unlike any most of the crowd had heard at a Scout function before, Trump mixed a traditional message to Scouts of encouragement about loyalty, service to others and never giving up, with mentions of fake news, former President Barack Obama, a replay of how Trump won the election, fake polls, and how Washington is a swamp, or even worse "a cesspool or sewer." Some in the crowd broke into chants of "USA, USA."

Trump told more than 40,000 Boy Scouts, leaders and volunteers at a national gathering in West Virginia that Secretary of Health and Human Services Tom Price "better get" the votes to begin debate on health care legislation Tuesday, lest Trump repeat his tagline from "The Apprentice," the reality show he once starred in.

"Hopefully he's going to get the votes tomorrow to start our path toward killing this horrible thing known as Obamacare," Trump said, before turning to Price.

"By the way, you gonna get the votes? He better get 'em," Trump said, adding: "Otherwise, I'll say: Tom, you're fired."

The comment drew laughs from the crowd and Trump gave Price a friendly pat on the shoulder, suggesting he'd been joking. White House spokeswoman Sarah Huckabee Sanders said she'd taken the comment that way as well.

President Donald Trump waves to the crowd of scouts at the 2017 National Boy Scout Jamboree. Steve Helber / AP

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Trump spoke at the National Scout Jamboree, and told them early: "Who the hell wants to speak about politics in front of Boy Scouts?"

But he couldn't help himself as he shifted to themes in his typical stump speech from campaign days, with occasional references to scouting. It was clear that politics was very much on his mind.

Earlier he had earlier urged Republicans to make good on their promise to repeal and replace Obama's signature health care bill, tweeting that, "Republicans have a last chance to do the right thing on Repeal & Replace after years of talking & campaigning on it."

Senate Majority Leader Mitch McConnell planned to call a vote Tuesday to begin debate on the legislation, though the outcome of the crucial roll call seemed an uphill climb.

Trump also singled out West Virginia Sen. Shelley Moore Capito, who has expressed reservations about the Republican health care bill.

"You better get Sen. Capito to vote for it," he told Price, adding: "You gotta get the other senators to vote for it. It's time."

Later, as he recited parts of the Scout oath, he paused at the word "loyalty."

"We could use some more loyalty, I'll tell you that," he mused.

Trump is the eighth president to attend the National Scout Jamboree, which is typically held every four years. Obama did not attend during his two terms, although he addressed a 100th anniversary event in 2010 by video.

Each U.S. president serves as honorary president of the Boy Scouts of America, and the organization said in a statement that it does not promote any political candidate or philosophy.

Trump said that 10 members of his Cabinet were Scouts, including Vice President Mike Pence. The president introduced to the stage Interior Secretary Ryan Zinke, a former Scout who dressed in uniform, and also brought out Energy Secretary Rick Perry and Price.

"Tonight we put aside all of the policy fights in Washington, D.C., you've been hearing about with the fake news and all that," he said.

He said he would instead focus on inspiring the Scouts.

Secretary of State Rex Tillerson spoke to the group on Friday. The organization is honoring Tillerson, an Eagle Scout himself, with the development of the Rex W. Tillerson Leadership Center at the West Virginia summit site.

Associated Press writer Jill Colvin in Washington contributed to this report.