Using a law targeting money launderers and drug dealers, the Internal Revenue Service has wrongfully seized millions in small business and individual bank account money on the mistaken belief that they were hiding ill-gotten gains.

A report by the Treasury Department Inspector General found that the IRS launched hundreds of cases between 2012 and 2015 against innocent people who the agency accused of evading the Bank Secrecy Act, which is aimed at thwarting illicit deposits. In a random sample of 278 IRS forfeiture cases involving this law, the IG found that 91 percent of the people and businesses had gotten the suspect money legitimately.

Under the 1970 law, banks must report currency transactions over $10,000. But it also bars “structuring” deposits in amounts under $10,000 intended to evade the reporting requirement. That’s only a crime, however, if someone intentionally tries to skirt the law. The Washington Post first reported the IG’s findings.

Get Breaking News Delivered to Your Inbox

The IRS, which is overseen by the Treasury Department, said it had ceased the structuring-related practices in 2014. The IG, though, found eight cases of such seizures after the new rules went into effect.

“Most people impacted by the program did not appear to be criminal enterprises engaged in other alleged illegal activity,” the IG said in a statement. “Rather, they were legal businesses such as jewelry stores, restaurant owners, gas station owners, scrap metal dealers and others.”

“This is ridiculous,” said Karen Harned, chief litigator for the National Federation of Independent Business, which represents small businesses, referring to the tax agency’s seizures.

“The IRS’s own internal watchdog found that the IRS had a practice of seizing entire bank accounts based on nothing more than a pattern of under-$10,000 cash deposits,” said lawyer Robert Everett Johnson, an attorney at the Institute for Justice, a legal firm fighting to overhaul the IRS’s forfeiture system, in a statement.

The cases involved were not for vast sums, but posed major problems for those who fell afoul of the IRS’s sub-$10,000 dragnet. In one instance in 2015, Forbes reported, a convenience store proprietor in Fairmont, North Carolina, lost $107,000 after the IRS seized his bank account.

“It took me 13 years to save that much money and it took fewer than 13 seconds for the government to take it away,” said Lyndon McLellan, owner of L&M Convenience Mart. L&M made deposits of less than $10,000 because a bank teller told the business that higher amounts would entail a lot of paperwork.

A vexing practice of the IRS, the IG’s report said, was that it focused on small businesses because they were easier targets than larger suspects. As the report noted, “[T]he Department of Justice had encouraged task forces to engage in ‘quick hits,’ where property was more quickly seized and more quickly resolved through negotiation, rather than pursuing cases with other criminal activity (such as drug trafficking and money laundering), which are more time-consuming.”

The IRS agents’ method of operation was “seize first, ask questions later,” the report said. And when the agents later asked their targets for an explanation about the deposits, these were disregarded, the IG said.

Two years ago, when reports of the IRS crackdown first appeared, a bipartisan group of House and Senate lawmakers, including Sen. Rand Paul, a Kentucky Republican, proposed legislation to restrict the structuring practice. Under their proposal, the IRS would have to seek a judge’s approval for a seizure, and only after producing evidence of illegal activity.