Kansas Gov. Sam Brownback (R) is calling all hands on deck to fix his state’s huge self-imposed budget crisis, which nearly cost him re-election this year, and the staunch conservative is now receiving an assist from an unlikely source: Obamacare.

The state’s well-documented budget troubles came after Brownback’s dramatic reductions in taxes since taking office in 2011. With its revenue drying up and cash reserves depleted, Kansas is staring at a $280 million hole in its $6.4 billion FY 2015 budget, which ends in June.

Brownback offered his proposal for closing that hole last week, a mixture of spending cuts and transferring funds from other parts of the budget to fill it. And second biggest of those transfers is $55 million in revenue from a Medicaid drug rebate program that was bolstered under the Affordable Care Act.

The short version then is this: Obamacare is helping Kansas address its fiscal crisis — even if Brownback’s administration seems loath to admit it.

“In the simple version, it would be like with your own bank account, you are transferring money from your savings account to your checking account,” Duane Goossen, former Republican state legislator and state budget director who now blogs independently, told TPM in a phone interview on Friday.

The Kansas Health Institute first outlined what was happening in a story last week. They noted that Kansas Budget Director Shawn Sullivan didn’t credit the federal law when explaining why the state would be able to use that money to close the gap.

“The additional revenue from the rebates is the result of higher-than-expected pharmacy utilization among the Kansas Medicaid population and better pharmacy program administration by the MCOs in the state,” Sullivan said, per KHI.

When contacted by the news agency, a state health department spokesperson initially told reporter Andy Marso that Obamacare “doesn’t have a role” in the $55 million that will help save the state’s finances. But the spokesperson later corrected themselves, saying they “had gotten incorrect information about the ACA’s role in the pharmacy rebate program.”

The rebate program is complicated, but here is the gist, as it was explained to TPM on Friday by George Washington University professor Brian Bauen. Under the program, pharmaceutical companies pay rebates to states and to the federal government, based on a percentage of their sales to the Medicaid program that year.

What the ACA did was allow Medicaid managed care (which is different than traditional fee-for-service) to participate in the drug rebate program. Kansas has recently reformed its Medicaid program to include significantly more managed care, though a health department spokesperson told TPM that the reforms had not been made because of the federal health care law.

Obamacare also increased the rebate rates, from 15.1 percent of the average manufacturer price for most brand-name drugs to 23.1 percent, and from 11 percent to 13 percent for generic drugs. The exact impact can be hard to suss out, but according to Bauen’s analysis of federal data, Kansas saw an increase in rebates from $60 million in 2009 to $90 million in 2012.

So while Brownback’s administration seems to want to credit more drug purchases and its own Medicaid reforms for the revenue that it is now using to fill its budget hole, Obamacare would also have played a role, as the health department spokesperson eventually acknowledged to KHI.

“Oh yeah, they definitely are saving money,” Bauen said. The ACA “would have increased the revenue from rebates.”

There are no legal restrictions for what states can do with the Medicaid rebate money, Bauen said. According to Goossen, it has historically been used to help pay for the state’s Medicaid program. But desperate times, desperate measures.