WASHINGTON (AP) — House and Senate negotiators have agreed not to require thousands of California National Guard troops to repay enlistment bonuses a decade after they signed up to serve in Iraq and Afghanistan.

The Pentagon had demanded the money back after audits revealed overpayments by the Guard under pressure to fill ranks and hit enlistment goals. But a provision in the annual defense policy bill being filed Wednesday requires the Pentagon to waive the recoupment of a bonus unless there is evidence showing service members “knew or reasonably should have known” that they weren’t eligible to receive the money.

A vote in the House on the must-pass defense bill is expected by Friday, followed by action in the Senate next week.

The Guard offered enlistment bonuses of as much as $15,000 and student loan aid at the height of the two wars in the 2000s.

Members of the California congressional delegation and veterans leaders had expressed outrage over a decision to force troops who had served overseas to return money when they fault lay with military recruiters.

“It’s clear that the Pentagon had all the right authorities to prevent this mess in the first place, but the benefit now is that Congress is going to keep the individuals overseeing this honest and the process open all the way through,” Rep. Duncan Hunter, R-Calif., said Wednesday. Hunter is a member of the House Armed Services Committee.

The provision to be included in the bill would apply beyond California troops and cover any member of the U.S. armed forces. The measure shifts the burden to Defense Department officials to prove service member were not eligible for a bonus or another type of special pay.

A review board is to examine all the bonuses and student loan repayment contracts awarded between 2004 and 2015 “for which the department has reason to believe a recoupment of pay may be warranted,” the measure states.

Any service member determined not to have been eligible for the bonus pay or aid must be contacted by service officials and given the opportunity to submit “documentary and other evidence,” according to the provision.

The board is directed to determine recoupment of a bonus unwarranted “unless the board makes an affirmative determination, by a preponderance of the evidence, that the member knew or reasonably should have known” they weren’t entitled to the money.

Rep. Darrell Issa, R-Calif., called the compromise “an important fix that ultimately does the right thing” by moving the burden of proof off the soldiers and onto the Defense Department.

“If soldiers who already repaid their bonuses do not have their money returned in an expeditious manner or if we later discover the Pentagon is still pursuing soldiers who accepted bonuses in good faith, we will revisit this with new legislation on Day 1 of the new Congress,” Issa added.