Hillary Clinton’s campaign convinced the U.S. Secret Service to pay extra for agents riding with candidates in chartered flights, and that caused the government pay $4 million to several campaign committees, according to a new report.

According to the Government Accountability Office (GAO), an attorney from the law firm representing the Hillary for America Committee emailed officials at the Secret Service in June 2015 to argue that the government should consistently pay a higher rate for flights on candidates planes.

The Secret Service provides protection to certain presidential candidates on the taxpayer’s dime, and pays each campaign committee for seats the agents occupy on the candidate’s chartered planes while on duty.

The Secret Service has two ways of calculating how much to pay the campaign: They either pay the campaign based on the lowest priced first-class seat available for the given route, or pay a “pro rata” rate calculated by dividing the cost of the chartered flight by the number of passengers. The agency is supposed to calculate both options and pay the campaign the lower price to save taxpayer money. (RELATED: US Secret Service Tackled A Chinese Security Guard Into The Earth In A Scuffle Over The Nuclear Football)

The Clinton campaign’s lawyer argued that the government should always pay the pro rata rate, even if the first-class rate would be a cheaper option for the government.

The Secret Service agreed with the unidentified law firm’s interpretation of the law, and as a result “the Secret Service ceased to adhere to its longstanding reimbursement policy and agency officials were directed to use the pro rata calculation method for reimbursing all campaigns for agent airfares,” the GAO said.

The Clinton camp’s error led the Secret Service to pay the higher rate to all four 2016 presidential campaigns, which included the campaigns of Vermont Independent Sen. Bernie Sanders, who was running as a Democrat, and Republicans Ben Carson, now Secretary of Housing and Urban Development, and President Donald Trump.

The GAO estimates that the government overpaid for 650 of the 1,671 flights Secret Service agents took with the four campaigns, and believes the total overpayments will add up to $3.9 million.

The GAO did not provide a breakdown of which campaign was overpaid the most, but the Trump campaign received the most reimbursement money in total.

In total, the government reimbursed the four campaigns $17.1 million for chartered flights. It reimbursed Trump’s campaign $7.3 million for 965 flights, Clinton’s campaign got $7.1 million for 1,317 chartered flights.

To make things worse, the Secret Service discovered their error in March 2016, heading into the busiest travel season for the candidates. Even though they knew the mistake, the Secret Service “did not ensure the agency reverted to its longstanding policy.”

“The money that the agency needlessly and erroneously paid the campaigns is sorely needed to help fund critical Secret Service activities that have faced recent budget cuts — including investigations into cyber and financial crimes,” Democratic Rep. Bennie Thompson of Mississippi told CNN.

There were other issues with the travel costs associated with the 2016 campaign. Trump’s campaign submitted invoices for 210 flights for then-Vice Presidential candidate Mike Pence that didn’t have a total number of passengers or the total cost of the chartered flight, making it impossible to calculate the cost per-person.

The Trump campaign also double-billed the government for three flight segments, causing the government to pay $21,000 more to the Trump campaign than it ought.

The Secret Service will review their reimbursements and calculate how much they overpaid. Eventually, the government will seek to collect the overpayments from the various campaigns.

All campaigns except Carson’s also made mathematical errors in their invoices. Hillary’s campaign had errors in 1 percent of its invoices, and 2 percent of the Trump campaign’s invoices had errors. The Bernie 2016 Committee had the greatest percentage of errors, with 29 (18 percent) of its 159 segment invoices containing mathematical mistakes.

Follow Thomas Phippen on Twitter

Send tips to thomas@ dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.