WASHINGTON — The Secret Service spent about $4 million too much for seats on campaign planes during the 2016 presidential election after misinterpreting the rules for calculating fares, according to a congressional watchdog report.

The Secret Service spent $17.1 million to include agents on flights chartered by the campaigns of Republicans Donald Trump and Ben Carson, and Democratic candidates Hillary Rodham Clinton and Bernie Sanders.

The Government Accountability Office report, released Wednesday, said the Secret Service was supposed to pay the lower of two options: the lowest commercially available first-class airfare or the proportional cost of the agent’s seat based on the total price of the charter. Instead, they paid the campaigns based only on the second option.

“Proper stewardship of Secret Service travel expenses is critical as they are paid by the American taxpayer — not the campaigns,” said Rep. Bennie Thompson of Mississippi.

The watchdog agency examined 650 of the more than 2,300 flights taken by agents during the 2016 campaign. The $3.9 million was an estimate for all campaigns — the agency did not break the estimated overpayment down by campaigns. Overall, the Secret Service reimbursed Trump’s campaign $7.3 million for flights, including for running mate Mike Pence and others. Clinton’s campaign received $7.1 million for flights, including for running mate Tim Kaine. Sanders was reimbursed $2 million and Carson $615,567.

The Department of Homeland Security, which oversees the Secret Service, said it would determine the specific overpayment and seek refunds from the campaigns.

A Secret Service spokesman, Shawn Holtzclaw, said it has taken steps to ensure the overpayments do not happen again.

The report said the mistakes began in 2015 after lawyers for the Hillary for America Committee said reimbursements should be based only on the charter flight calculation. Secret Service officials agreed, abandoning their previous comparison policy. After a congressional inquiry in March 2016, the Secret Service admitted it had made a mistake, but didn’t fix the issue during the campaign, the report said.

WATCH: Are the unprecedented demands of protecting the Trumps straining the Secret Service?

Secret Service agents were detailed once candidates requested protection, met the requirement for major candidate status and received authorization from the Homeland Security secretary and others.

Overall, the Secret Service spent about $58 million in travel expenses, including airfare, vehicle rentals and meals in 3,236 travel stops during the campaign, the GAO report said. Expenses for Trump’s campaign were $26.3 million, Clinton $20.2 million, Sanders $7.9 million and Carson $3.4 million.

The report was requested by the top Democrat on the House Homeland Security Committee, Rep. Bennie Thompson of Mississippi.

Thompson said in a statement it was “unacceptable” that millions were overpaid.

“Proper stewardship of Secret Service travel expenses is critical as they are paid by the American taxpayer — not the campaigns,” he said.