Honoring troops with increasingly elaborate displays of patriotism has become as much a part of professional sporting events as the singing of the National Anthem. But a Senate investigation found that some of those events—color guard parades, reenlistment ceremonies, ceremonial first pitches—were bought and paid for by the Pentagon in a form of “paid patriotism” that cost millions of dollars.

The report issued Wednesday by Sens. John McCain and Jeff Flake, both Arizona Republicans, said that paying sports franchises to honor service members was a “boondoggle” and a “wholly unnecessary and a waste and abuse of taxpayer funds.”

If any team was really interested in honoring those serving in the military it “should do so at its own expense.”

In a statement, Matthew Allen, a Pentagon spokesman, said that the military services are allowed to pay for marketing and advertising when it is in support of recruiting efforts, and that it often performs community outreach in order to “connect with the American public.”

But since September, the Defense Department has taken several steps to ensure the contracts are used appropriately. That includes requiring all sport-events contracts to be reviewed by a senior official to make sure that they are “appropriate and reasonable.” Officials also will not approve contracts that require payment “to honor members of the Armed Forces.”

Since 2012, the Pentagon paid $10.4 million on marketing and advertising contracts with most of the professional sports leagues, including the National Football League, Major League Baseball, the National Hockey League, the National Basketball Association and Major League Soccer, the report said.

“By paying for such heartwarming displays like recognition of wounded warriors, surprise homecomings, and on-field enlistment ceremonies, these displays lost their luster,” the report said. “Unsuspecting audience members became the subjects of paid-marketing campaigns rather than simply bearing witness to teams’ authentic, voluntary shows of support for the brave men and women who wear our nation’s uniform.”

Some of the more egregious examples included paying the Seattle Seahawks for the “opportunity for up to 10 soldiers to reenlist pre-game on the field” at a 2014 game. The Guard also paid the Indianapolis Colts for use of a luxury suite, autographed items, and visits with cheerleaders.

Taxpayers also spent $10,000 for an “on-field swearing in ceremony” with the New York Mets. And when 80 National Guard members were honored at an Atlanta Falcons game that also came at a price: $315,000.

The Guard spending came as it “was simultaneously requesting additional funds from Congress to cover a more than $100 million shortfall to pay its troops and conduct critical training,” the report said.

In all, the investigation found that the Pentagon paid a total of 104 professional franchises, as well as NASCAR, Indiana University, Purdue University and the University of Wisconsin.

Since McCain first started investigating the issue earlier this year, the Pentagon has banned the practice. But he said that it “still cannot fully account for the nature and extent of paid patriotism activities.”

In a Nov. 2 letter to McCain and Flake, Roger Goodell, the NFL Commissioner, wrote that the league “deeply values the dedication and sacrifice of the men and women who serve our country.”

He added that NFL officials “strongly oppose the use of recruitment funds for anything other than their proper purpose.” Teams are conducting audits of their contracts with the Pentagon, he wrote, and if they find “inappropriate payments were made, they will be refunded in full.”

MLB said that it has “encouraged teams to take steps to avoid any appearance that they are being paid for any such ceremonies, and we will hold extensive conversations about this topic during our off-season meetings with clubs.”

The NBA said it enters into agreements with teams for advertising purposes.

“In individual circumstances, those agreements may include details of on-court tribute ceremonies that teams plan to conduct, in keeping with the NBA’s long history of honoring our men and women in uniform,” spokesman Mike Bass said in a statement. “These tributes are not paid for by the military. We will perform an additional review to ensure that this is the case.”

We’ve reached out to other sports organizations for comment as well.