The NFL is returning $724,000 it was paid by the Defense Department to host patriotic celebrations at games.

The refund was disclosed in a letter from NFL Commissioner Roger Goodell to Sens. John McCain and Jeff Flake, the authors of a study last year criticizing what it called examples of "paid patriotism." Both senators praised the NFL's refund.

"Returning the $724,000 is the right thing to do," said Senator McCain.

That's how much money the U.S. government has paid the league since 2012 to host military "appreciate activities," according to Goodell.

The league also collected fees for its recruitment efforts at games, such as signs and booths in stadiums urging fans to enlist, but the report deemed that those payments were appropriate. Goodell said that the NFL audited even more contracts than Senate investigators examined, looking at 100 agreements over the course of the four most recent NFL seasons.

Related: Atlanta Falcons' new stadium will sell $2 hot dogs, $5 beers

The original senate report listed an estimated $6.8 million spent on "paid patriotism" during those four years across all different sports. Among the paid events that the report flags as questionable were on-field color guard presentations during the national anthem, enlistment and reenlistment ceremonies, the unfurling of a giant flag by members of the military, and ceremonial first pitches in baseball. NFL teams received the most money of any sport, according to the report.

"The NFL is only one of several sports leagues we identified that accepted money from the Pentagon in return for honoring our troops," McCain added. He urged other leagues to follow the NFL's example and return the money.

Related: NFL revenue - Another record season

At the time of the report in November the Defense Department defended its sports marketing efforts as a way to "reach a large number people to connect with the American public."

But the department also said that changed the rules to prohibit payments for patriotic ceremonies back in September 2015, before the Senate report was released.