States have developed various ways to avoid paying their fair share of Medicaid expenses over the years, in some cases costing the federal government hundreds of millions of dollars in extra funding for the program.

The Department of Health and Human Services, which runs Medicaid through its Centers for Medicare and Medicaid Services (CMS), has known about the issue for more than a decade, but states still find ways to game the system. The agency’s inspector general this year listed the issue among 25 key problems the agency needs to address.

In a report this year, the watchdog agency highlighted one of the more common schemes that states have used to dodge Medicaid costs.

Federal auditors found that Pennsylvania taxed health-care providers and used the new revenue to give those providers greater Medicaid reimbursements. This would trigger higher Medicaid payments to the state, since the federal government matches state contributions to the program.

In short, the Keystone State was using a shell game to make money off of Medicaid.

Pennsylvania is hardly alone. North Carolina used a similar scheme to add $60 million in federal funding to its coffers, according to a report this year in the Raleigh News & Observer.

The inspector general said in a report this year that it has seen “numerous examples in which states then redirected that additional money for other purposes while medical facilities remain underfunded.”

CMS in July issued guidance to state medicaid directors and health officials to clarify its policy on permissible health-care-related taxes, an attempt to prevent further gaming of the system.

CMS and Congress have also taken steps to cap Medicaid payments for health-care providers, helping restrict the ability of states to collect excessive reimbursements through federal matching. Those policies have helped save $79 billion over 10 years, according to the HHS inspector general.

But other schemes have emerged. In one example, auditors found that New York had used a flawed formula to report higher Medicaid costs than it actually incurred, snagging more than $1 billion in extra funding from the U.S. Treasury in 2009 and about $700 million extra in 2010.

New York agreed in 2012 to work with the CMS to ensure that its rates meet federal requirements, according to the inspector general.

The watchdog agency has recommended that Congress and CMS implement policies that link Medicaid payments to the actual cost of service.