As Prince William County grapples with the sudden loss of a controversial program to identify and deport illegal immigrants who commit crimes, the immigration debate has been renewed just ahead of Election Day.

County officials were surprised that a partnership allowing Prince William to enforce federal immigration laws, known as 287 (g), is being renewed only until year’s end by the Department of Immigration and Customs Enforcement. County officials had thought they were negotiating a new three-year deal.

Corey A. Stewart, chairman of the Prince William Board of County Supervisors, considers the program the crux of its anti-illegal immigration efforts, passed in 2007, mandating that police check the immigration status of people arrested.

Stewart (R-At Large) said he thinks ICE and the Obama administration are playing politics.

“Frankly, I didn’t think they’d have the guts to do it,” Stewart said of the Obama administration. “It’s going to hurt them in Virginia, and it’s going to hurt them in Prince William County. I really didn’t think they’d be foolish . . . from a political perspective to terminate the program right before the November elections.”

ICE has remained mostly mum about the reasons for the change. The Obama administration has instructed federal immigration offices across the country to focus on border security and people who commit serious crimes. It plans to phase out 287 (g) in favor of the Secure Communities program.

“The Secure Communities screening process, coupled with federal officers, is more consistent, efficient and cost effective in identifying and removing criminal and other priority aliens,” ICE spokeswoman Danielle Bennett said in a statement.

The department has declined to answer further questions.

Under Secure Communities, suspects’ names are run through an ICE database, which contains records of people who have come into contact with federal immigration authorities. After this year, Prince William law enforcement authorities would no longer be able to investigate the immigration status of people they arrest.

County officials say they won’t be able to identify nearly as many illegal immigrants. In a statement, they said that 5,000 people arrested in the county so far have been found to be here illegally. With the change, they estimated that number would drop by 60 percent.

The change was welcomed by people who say the 287 (g) program can lead to racial profiling and distract police from their core responsibilities.

Claire G. Gastanaga, executive director of the Virginia American Civil Liberties Union, said the ACLU has opposed the program from the beginning because ICE already detains and deports dangerous criminals.

“We think it’s antithetical to good, effective community policing,” she said. “You confuse the roles of local police and federal immigration authorities. You end up being less safe because people are not willing to cooperate with the police.”