IN THE CLOSING hours of Virginia's gubernatorial race, Republicans have settled on a theme: Be afraid, be very afraid.

Locked in a tight race and grasping for a wedge issue to enthuse their conservative base, Republicans have seized on the bogeyman of illegal immigration, which they suggest is costing Virginians their jobs, their places at universities and -- this part is unstated, but it's there -- their security. In a coordinated effort at fear-mongering, Jerry W. Kilgore, the Republican candidate, unveiled a spooky television ad starring undocumented immigrants and criticizing his opponent, Democratic Lt. Gov. Timothy M. Kaine, for his alleged softness on the issue. At the same time, GOP legislators proposed a package of laws that, taken together, would have Virginians believe that the commonwealth faces no greater menace than the 200,000 illegals in their midst.

The Republicans would bar undocumented residents from receiving in-state tuition at public universities, even those who were smuggled in as small children and educated in Virginia public schools. They would broaden police powers to detain and deport illegals, scrub voter rolls to ensure none could cast a ballot, and force employers to pay a $5,000 fine for each illegal worker on their payrolls.

They would further ban day-laborer shelters like the one approved by the town of Herndon, in Fairfax County, if they help undocumented workers. Not to be outdone, Rep. Tom Tancredo (R-Colo.) has urged U.S. prosecutors in Virginia to investigate whether the Herndon shelter, intended to get job-seekers out of a convenience store parking lot, violates federal criminal conspiracy laws.

As for Mr. Kaine, he is hardly "soft" on illegality. He would bar undocumented immigrants from access to most state benefits and services and deny them in-state tuition at public colleges -- but with that exception for children schooled in Virginia that Republicans won't recognize. He correctly characterized the Herndon day-laborer center as an issue best left to local authorities, not the state.

It's a good bet that the Republican strategy is to use the immigration issue now to rile up voters, then let it fade away after the election. The fact is that states are ill-equipped to handle an immigration problem bequeathed them by the federal government's botched policy. That policy ignores the enormous demand for cheap labor, sets too low a ceiling on immigrants entering the country and fails to police the borders. The result is a surge of undocumented workers unheeded by federal authorities, hired by American employers and exploited as an issue in election season.

The proper response is to press the Bush administration and Congress to face up to the problem, not to subject immigrants to a nativist campaign of fear and loathing. Immigrant-bashing may be an effective headline-grabber. But by playing on voters' xenophobia, it may also plant seeds of hatred and resentment in an increasingly diverse state.