Homeowners flooded county treasurer offices Friday with millions of dollars in early property tax payments, trying to get around a new deduction cap in the federal tax code overhaul.

Property owners rushed to prepay 2018 property taxes on the final business day of the year, although Cook County officials plan to open a downtown Chicago office on New Year's Eve to accept last-minute payments.

The tax code rewrite signed into law last week by President Donald Trump caps the itemized deductions homeowners can claim for state and local taxes at a combined $10,000. Previously, there was no limit.

As a result, county treasurers were inundated with long lines even after a Wednesday advisory notice by the Internal Revenue Service cast doubt on whether homeowners who prepaid could qualify for the deductions one more time. Tax experts already have cautioned that the advisory could face legal challenges.

"In general, whether a taxpayer is allowed a deduction for the prepayment of state or local real property taxes in 2017 depends on whether the taxpayer makes the payment in 2017 and the real property taxes are assessed prior to 2018," the IRS guidance states. "A prepayment of anticipated real property taxes that have not been assessed prior to 2018 are not deductible in 2017."

Many taxpayers rolled the dice anyway to beat the Friday deadline for making prepayments.

Facing a bureaucratic nightmare, offices enlisted staffers from other county departments to keep crowds orderly and wait times relatively short. Treasurers were peppered with questions about the IRS notice but could only steer residents to tax advisers.

"It's creating some logistical issues," said Kane County Treasurer David Rickert, who expects his office will collect about $40 million in prepaid taxes.

In Cook County, 85,000 property owners prepaid more than $529 million by Friday afternoon, Treasurer Maria Pappas said. Last year, roughly 1,700 homeowners made $14.4 million in prepayments.

The unprecedented influx of cash is set to hit local government coffers within a month.

"This is a huge windfall. Are you kidding?" Pappas said. "To collect $100 million overnight, I can't even tell you how unimaginable that is."

Cook County will accept in-person payments from 9 a.m. to 5 p.m. New Year's Eve in the treasurer's office at 118 N. Clark St. in downtown Chicago. Prepayments also can be made online through Chase Bank for the first time.

In DuPage, Kane and McHenry counties, treasurer offices planned to stay open into Friday night to take payments from residents who were in line by closing time. McHenry residents also can deposit their prepayments in a lockbox outside the treasurer's office until Sunday night.

Roughly 6,000 to 6,500 people prepaid their taxes this year, McHenry Treasurer Glenda Miller said. The office's bank account holds about $3.44 million, with another $5 million ready to be sent to the bank and many more checks to be processed, she said.

She anticipates prepayments to total $15 million to $20 million. Last year, 54 people prepaid $650,000. Township assessments were published through November 2017 and mailed out to property owners, Miller said.

Lake County officials could not provide the number of people who have prepaid taxes, but the Waukegan office was busiest Tuesday, they said.

DuPage County, meanwhile, had collected about $176 million in prepaid property taxes by early Friday evening, Treasurer Gwen Henry said. That's compared with last year's total of about $1 million.

Lines on Friday stretched from her office through most of the first floor of the county administration building in Wheaton. Taxpayers were in such a rush they wrote checks while they waited in line.

DuPage residents could prepay up to 105 percent of their tax bill from last year.

"I am the drop box," said Henry, who held an envelop to collect checks from residents who didn't want to wait for a receipt.

Doug Matton arrived just after 8:30 a.m. and waited about 20 minutes to prepay his taxes. But the Burr Ridge man wasn't sure if the hassle would pay off.

"We'll see what the IRS says," he said.

• Daily Herald new services and staff writers Jake Griffin, Elena Ferrarin, Doug T. Graham, Chacour Koop and Susan Sarkauskas contributed to this report