Defense Secretary Ash Carter ordered the Pentagon on Wednesday to stop clawing back excessive recruiting bonuses paid to California National Guardsmen.

The move came after news broke over the weekend that the Pentagon had been seeking repayment of enlistment bonuses paid to California Guardsmen. Some of the payments were made by mistake, others were taken fraudulently.

Previous story: California soldiers must repay enlistment bonuses

"While some soldiers knew or should have known they were ineligible for benefits they were claiming, many others did not," Carter said in a statement. "About 2,000 have been asked, in keeping with the law, to repay erroneous payments."

As first reported by the Los Angeles Times, the Pentagon sought repayment of the excess bonuses from almost 10,000 California Guard soldiers. The paper reported that many of the soldiers affected had served multiple combat deployments and had been ordered to repay bonuses plus interest. Some had had their wages garnished and tax liens slapped on them when they refused to pay. The bonus scandal was revealed after audits showed widespread overpayments.

Several soldiers and veterans told the Times that the forced repayments were causing them severe financial hardships.

Carter ordered a review of the program and charged his staff with developing a process to resolve the cases by July 1, 2017.

"Hundreds of affected guard members in California have sought and been granted relief," Carter said. "But that process has simply moved too slowly and in some cases imposed unreasonable burdens on service members."

The National Guard struggled to fill its ranks during the height of the wars in Iraq and Afghanistan, relying on bonuses to sign recruits and for re-enlistment.