An Illinois county has raked in $10 million in federal funds for its decades-old deal with the government to detain immigrants living in the country illegally, according to a report.

McHenry County signed a bed-rental contract with the U.S. Immigration and Customs Enforcement in the early 2000s, the Chicago Sun-Times reported. The federal government agreed to pay the northwest Illinois county about $7 million for the bed-rental program.

The contract was to expire after 10 years in 2015, but county officials renewed the contract in 2014. According to the contract, ICE pays the county $95 per inmate per day.

By the end of 2018, the program will reportedly bring in more than $10 million, which is up from $8.3 million last year.

McHenry detained an average of 233 inmates daily in fiscal year 2017, up from 167 in 2015, according to data provided by Detention Watch Network, an immigration detention advocacy group in Washington, D.C.

The detention center’s daily average population through Oct. 1 was 270, ICE figures show.

"We still have all kinds of available capacity in our jail, so we're utilizing that capacity in a manner that makes revenue sense for us," McHenry County administrator Peter Austin said.

The county also makes additional revenue for transporting detainees, according to Lt. Mike Lukas of the McHenry County Sheriff’s Office. Last year, McHenry was paid $450,000.

Critics argue that such a money-making partnership highlights the potential weaponization and monetization of ICE detention.

County board member Carlos Acosta, who was elected in November, questioned whether McHenry county should continue to be involved in such a partnership.

"It's been a divisive issue because it raises the question, is there a profit motive when the county sheriff is making traffic stops?" Acosta said.

While he acknowledges the money the program generates for the county, Acosta said he’ll push for greater oversight.

The Associated Press contributed to this report.