DENVER — As he prepared to vote for some of the strictest gun control measures in the country earlier this year, John Morse, a former police chief and president of the State Senate, knew he would infuriate some constituents.

“There may be a cost for me to pay, but I am more than happy to pay it,” he said in a recent interview.

Now, after months of gathering signatures and skirmishing in court, gun activists in Colorado, with the support of the National Rifle Association, have forced Mr. Morse and a fellow Democrat, Senator Angela Giron, into recall elections. The recall effort is seen nationally as a test of whether politicians, largely Democrats, outside big cities and deep-blue coastal states can survive the political fallout of supporting stricter gun laws.

“Legislators should be scared,” said Becky Mizel, chairwoman of the Republican Party in the old steel and railroad town of Pueblo, Ms. Giron’s home district. “We have a battle here.”