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

WASHINGTON — The head of the Boy Scouts apologized Thursday for President Donald Trump's remarks this week at a gathering of thousands of scouts, saying "political rhetoric" should never have been inserted into the event.

In a letter posted online, MIchael Surbaugh, the chief scout executive for the Boy Scouts of America, apologized to those "offended by the political rhetoric that was inserted into the jamboree. That was never our intent."

Trump spoke before 40,000 Boy Scouts on Monday in West Virginia and at times he treated the event more like a campaign rally than a president who was addressing a non-partisan organization sponsoring a large youth gathering.

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

Surbaugh noted that there was a long-standing tradition of the Boy Scouts inviting presidents to speak at the Jamboree, but he said it was "in no way an endorsement of any person, party or policies."

He added, "For years, people have called upon us to take a position on political issues, and we have steadfastly remained non-partisan and refused to comment on political matters. We sincerely regret that politics were inserted into the Scouting program."

White House Press Secretary Sarah Huckabee Sanders said she hadn't seen the Scouts' statement and declined to comment on the specifics of the letter; however she offered her firsthand account of the event where she said she saw nothing but thousands of Boy Scouts "cheering the president on."

"They were pretty excited he was there," she said, adding they were "probably one of the most energetic crowds" she'd seen the president address.

Trump's appearance was widely panned for mixing encouragement of Scouting with out-of-place political mentions, including a joke about firing his Health and Human Services secretary should health care efforts fail in Congress. He also delivered a replay of how he won the 2016 presidential election despite fake news and fake polls.

"Who the hell wants to speak about politics in front of Boy Scouts?" Trump said before offering a meandering series of thoughts about health care, President Barack Obama, and the "cesspool or sewer" of Washington.

Even simple tenets of Scouting spurred political musings, with Trump pausing to reflect on the word "loyalty" and adding: "We could use some more loyalty, I'll tell you that."