Updated

The fate of a little-noticed ballot measure in strongly Democratic Oregon serves as a warning to President Barack Obama and his party about the political perils of immigration policy.

Even as Oregon voters were legalizing recreational marijuana and expanding Democratic majorities in state government, they decided by a margin of 66-34 to cancel a new state law that would have provided driver's licenses to people who are in the United States illegally.

Obama is considering acting on his own, as early as this week, to possibly shield from deportation up to 5 million immigrants now living illegally in the country. Some Republicans in Congress are threatening a government shutdown if the president follows through.

"The Oregon measure tells you these measures are not easy or simple," said Muzaffar Chishti of the Migration Policy Institute. "The political cost may be significant, even in blue states."

The state law had seemed to be popular. It easily passed last year with bipartisan support in the Democratic-controlled Legislature and was signed Democratic Gov. John Kitzhaber, who was re-elected Nov. 4.

Opponents barely gathered enough signatures to put the repeal question on the ballot. Immigrant rights groups outspent their opponents 10-1.

Still, the measure failed in every county but the state's most liberal one, Multnomah, home to Portland. Even there it trailed significantly behind other Democratic candidates and causes.

"It was really the epitome of a grassroots effort," said Cynthia Kendoll, one of the activists who led the campaign against licenses. "There's such a disconnect between what people really want and what's happening."

Obama made his postelection pledge on immigration despite the drubbing that Democrats took across the country. He said he had to act because Congress has deadlocked on immigration for years.

A bipartisan Senate bill to provide citizenship to many of the 11 million people in the U.S. illegally died in the Republican-controlled House, and with the GOP now holding a majority in the Senate, many believe it is unlikely any broad immigration measure could make it to Obama before the end of his term.

Allowing immigrants in the U.S. illegally to remain in the country generally polls well. Even 57 percent of the conservative-leaning national electorate that voted Nov. 4 favors legalization, according to exit polling for the Associated Press and other news organizations.

Immigration has been seen as a winning issue for Democrats because Hispanic and Asian populations account for an increasing share of the electorate, especially in presidential years.

Eleven other states have granted driver's licenses to people in the U.S. illegally, and 17 allow them to pay in-state tuition at public universities.

But Mark Krikorian of the Center for Immigration Studies in Washington, D.C., which advocates more restrictions on immigration, says voters often are befuddled by complex immigration proposals and polling questions, overstating the actual support for an immigration overhaul.

The Oregon vote, he said, is proof of that.

"Whenever the public gets that sort of clear-cut, black-and-white issue for tougher controls — even in Oregon, when they're legalizing dope — they support them," Krikorian said. "It really highlights how this issue is not a Republican-liberal issue like, say, taxes and abortion, but an up-down issue, elites versus the public."

Greg Olson, a lifelong Portland resident and conservative, was pleasantly surprised the driver's license law was repealed by such a large margin in his liberal state. "Licensing for driving I think is a privilege for a legal citizen," Olson said.

Oregon immigrant rights groups argue that the issue wasn't as clear as opponents are suggesting after the fact. The state has a relatively small immigrant community — only 12 percent of the population is Hispanic and 3 percent Asian, below the national average for both ethnic groups.

Because relatively little money was spent on the campaign, voters did not know why they should preserve the licenses, said Andrea Miller, director of the Oregon immigrant-rights group Causa.

"This was a very nuanced, very complex measure," Miller said. "Just because someone voted no doesn't mean they don't accept the immigrant community. It doesn't mean that they don't want immigration reform. It means they don't want that particular solution for Oregon."

Marshall Fitz of the Center for American Progress in Washington, which has argued that Obama should act, acknowledged that the first response of many voters may be unfavorable to immigrant rights groups' cause.

"Is there an instinct toward security, hunkering down and against welcoming the other?" Fitz said. "That's part of human nature. But that doesn't mean instincts can't be overcome by reason."

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino