In early February, federal prosecutors in Utah accused Zachary Bassett and Mason Warr of cheating the United States government out of millions of dollars. The accounting firm they operated had submitted more than 1,000 fraudulent tax forms to the Internal Revenue Service on behalf of businesses trying to claim pandemic-era stimulus funds, the prosecutors said.

COS Accounting and Tax shut down later that month, leaving businesses and taxpayers that had paid the firm to help them claim federal money trying to figure out what had happened and why they were suddenly receiving audit notices from the I.R.S.

Amid the onset of the pandemic in 2020, as large swaths of the economy went into lockdown, Washington set up various programs to help keep businesses and their workers afloat. Among them was the Employee Retention Credit, a tax benefit that was created as part of the initial $2 trillion pandemic relief legislation. The program offered businesses thousands of dollars per employee if they could show that Covid-19 was hurting their bottom lines and that they were continuing to pay workers.

The money was intended to be a lifeline for struggling companies. Instead, it has become a magnet for fraud, creating a cottage industry of firms that market themselves as tax credit specialists who can help clients — even those who don’t actually qualify for the money — reap huge refunds from the I.R.S. Although the public health emergency is over, taxpayers can continue to apply for the tax credit until 2025. That has fueled a run for the money and the proliferation of financial service providers, who often charge hefty upfront fees or take cuts of around 25 percent of any tax refund.

The tax credit has become so popular that it is turning out to be far more costly than expected. In 2021, after Congress expanded eligibility for the credit, the Congressional Budget Office projected that it would cost the federal government about $85 billion over a decade — up from an earlier estimate of $55 billion. However, even that turned out to be an underestimation: the I.R.S. said it has already paid out $152 billion in refunds associated with the tax credit since it first became available and has a backlog of about 800,000 applications that it is trying to process.

The I.R.S. does not yet know how many of the approved refunds were based on fraudulent applications. But it has begun ramping up efforts to root out scams and focusing additional scrutiny on filings from firms that appear suspicious.

On Thursday, the I.R.S. issued a warning to businesses to be on the lookout for “scams” related to the tax credit, saying it was fueling a flood of “invalid” applications.

“These are Johnny-come-latelies, showing up and they’re pushing this product, pushing this activity in a way that is unethical,” Douglas O’Donnell, the deputy commissioner of services and enforcement at the I.R.S., said in an interview. “It is drawing businesses into a trap, that they will then be claiming a credit that they are not entitled to.”

Mr. O’Donnell warned that those who received refunds but were ineligible for the money would have to repay the funds with penalties. He said the I.R.S. was aggressively auditing taxpayers who collect the refunds and the firms that process them. He estimated that hundreds of thousands of tax credit “mills” have popped up across the country in the last three years.

“They seem to be everywhere,” Mr. O’Donnell said.

The tax credits are less well known than the more popular Paycheck Protection Program, which provided forgivable loans to cover payroll, rent and utility expenses during the pandemic. But for eligible taxpayers, they have the potential to provide a substantial windfall in the form of a tax refund. Businesses, including nonprofit organizations and churches, can seek up to $26,000 for each employee on the payroll if they can show that their operations were fully or partially suspended in 2020 or part of 2021, and report a significant decline in their revenues during that time.

However, the fine print that determines if a business is eligible is complicated and the I.R.S. is concerned that firms that are processing applications for the credit at high volume are overlooking important restrictions in order to rake in bigger refunds and commissions.

For instance, the I.R.S. is concerned about taxpayers dipping into multiple pots of relief money and says many tax preparation firms are not telling clients that they cannot claim the tax credit on wages if they also received money to cover payroll costs through the Paycheck Protection Program.

The ballooning cost of the program is exacerbating America’s precarious fiscal situation. The White House and Republican lawmakers are locked in a bitter fight over raising the debt ceiling, which caps how much money the United States can borrow. The Treasury Department has estimated that the government could run out of cash as soon as June 1 and has resorted to accounting maneuvers so that it can keep paying its bills.

Treasury officials last month pointed to the Employee Retention Credit payouts as a reason that federal tax revenues are more meager than expected.

Lawmakers have been debating clawing back some unused pandemic relief funds as part of the debt limit and budget negotiations, but the tax credit does not appear to be part of those discussions. Senator Kirsten Gillibrand, Democrat of New York, sent the I.R.S. a letter this month urging it to clear its backlog and issue refunds faster.

More applications for tax credits are coming in every day as firms continue to blitz social media sites and TV and radio stations with ads touting the ease of getting federal money. In some cases, the firms are cold-calling potential customers.

Since last October, there have been about 9,000 advertisements promoting application services for employee retention tax credits airing on national cable and broadcast television networks, according to the ad tracking firm Vivvix/CMAG.

About three-quarters of those were sponsored by one of the biggest players in the industry, Innovation Refunds, which advertises on networks such as CNBC and claims that it takes just eight minutes for the firm to determine if an applicant is eligible. The firm says it has helped businesses claim over $1 billion in payroll tax refunds.

“That easy,” a narrator says in one of the ads. “But it’s only available for a limited time.”

Innovation Refunds, which takes a 25 percent cut of whatever refund a customer receives from the I.R.S., uses a network of tax attorneys to review the applications and process the forms. It received financing from the investment firm Raistone to expand its ability to advertise and process more amended tax returns.

“If you don’t have the knowledge, then you’re not going to seek this out,” said Mireille Rosselli, a spokeswoman for Innovation Refunds. “We’re on a shot clock.”

Ms. Rosselli added that Innovation Refunds has a rigorous system of vetting applications: “Our process is designed to deliver what Congress has intended to do — ensure that only eligible businesses apply for and receive government incentives and credits.”

Firms providing employee retention tax credit services use different models. Some do not have certified public accountants on staff and rely instead on lawyers, offshore workers or software to crunch the numbers. Others rely on customers to “attest” that they are eligible for the tax credits, leaving those customers more liable in the event of an audit.

Brian Anderson, who has a background in software, co-founded E.R.T.C. Express in 2021 after learning that traditional accountants did not seem to have the time to help their clients go through the cumbersome process of applying for the credits. His business, which has offices in Atlanta and Tampa, has a team of in-house accountants and a more rigorous monthlong process to determine if a client is eligible to apply. Customers can either pay an upfront fee or a percentage of their eventual refund.

“It’s complex to figure out the answer to the question of, are you eligible,” said Mr. Anderson, estimating that about a third of his potential clients do not qualify. “If you’re not eligible, it’s a lot of work for nothing.”

The I.R.S. acknowledges that applying for the tax credit is a complicated process, made more difficult by the fact it must be done by amending previous tax returns using paper forms. The agency cautions that firms who say the process can be accomplished quickly and easily are likely misleading their customers.

Traditional accountants have been watching with concern as applications for the employee retention tax credit have boomed. Many have since been hired to help taxpayers who suddenly find themselves under I.R.S. scrutiny.

“These guys are preying on people, promising the moon,” said Mark C. Wagner, an accountant who is based near Dallas. “If your sales did not meet the criteria for the credit, then you have to pay the credit back, plus penalties, plus interest.”

A lawyer for Mr. Bassett, who pleaded not guilty, said that COS Accounting and Tax took seriously its responsibilities to comply with the I.R.S. requirements when applying for benefits for their clients. The lawyer, Kathryn Nester, explained that the regulations and guidance about the credit “were not often clear and were revised frequently.”

That has provided little solace for clients of the business that have been looking for answers about their applications or left to contend with audits.

Wanchai Chab was working for a Utah-based company selling pest control supplies in California in 2020. Because he had set up a limited liability company, he was advised that he could apply for the employee retention tax credit through COS Accounting and Tax. He paid $500 up front and was told that he would get a credit of $3,500.

But instead of getting a big refund, Mr. Chab, 25, received an audit notice earlier this year and ended up having to pay additional taxes.

Fortunately for Mr. Chab, he was not penalized by the I.R.S. because he never received the credit.

“The auditor said she understood what was going on and knew of lots of people who got ripped off like this,” Mr. Chab said.