Colorado Gov. John Hickenlooper (right) is hugged by Rep. Rhonda Fields, D-Aurora, after he signed gun control bills into law Wednesday at the Capitol in Denver. Fields was a co-sponsor of bills on background checks and the size of ammunition magazines. (ASSOCIATED PRESS / Ed Andrieski, Pool)

DENVER (AP) — The governor of Colorado signed bills Wednesday that put sweeping new restrictions on sales of firearms and ammunition in a state with a pioneer tradition of gun ownership and self-reliance.

The bills thrust Colorado into the national spotlight as a potential test of how far the country might be willing to go with new gun restrictions after the horror of mass killings at an Aurora movie theater and a Connecticut elementary school.

The approval by Gov. John Hickenlooper came exactly eight months after dozens of people were shot at the theater, and the day after the executive director of the state Corrections Department was shot and killed at his home.

The bills require background checks for private and online gun sales and ban ammunition magazines that hold more than 15 rounds.

Two ballot measures have already been proposed to try to undo the restrictions.

At the signing ceremony, Hickenlooper was surrounded by lawmakers who sponsored the bills. He looked around with a solemn expression before signing a measure requiring buyers to pay fees for background checks.

Each time he signed a bill, applause erupted from lawmakers and their guests, who included Jane Dougherty, whose sister was killed in the attack at Sandy Hook Elementary in Newtown, Conn.; Sandy Phillips, whose daughter was killed in Aurora; and Tom Mauser, whose son was killed in the 1999 Columbine shooting in Colorado.

Phillips, who lost daughter Jessica Ghawi, reminded Hickenlooper that it was the eight-month anniversary of the theater rampage.

“You’ve given us a real gift today,” she told the governor.

Later, Phillips added: “Thank you so much. You’re leading the entire country.”

Dougherty thanked Hickenlooper with tears in her eyes. Mauser also expressed gratitude.

“I knew it would be a long haul,” he said. “But I had faith in the people of Colorado.”

Democratic Rep. Rhonda Fields, who represents the district that includes the theater, said the governor had signed “common-sense legislation that reduces gun violence in our communities by keeping guns out of the hands of criminals, domestic violence offenders and the seriously mentally ill.”

The shootings led Hickenlooper and other state Democrats to take on the issue of gun control. They succeeded while members of their party stumbled in other states.

Washington state’s Democrat-controlled House failed this month to pass a universal background check bill. A bill requiring background checks at gun shows in New Mexico also stalled in that Democrat-led Legislature.

The measures signed by Hickenlooper were the centerpieces of a package of gun bills introduced this session in Colorado.

Under the laws, gun sales and transfers between private parties and purchases conducted online will be subjected to background checks. Ammunition magazines that hold more than 15 rounds will be banned and subject to criminal penalties. Both bills take effect July 1.

Lawmakers debated firearms proposals after the Columbine High School shooting, and began requiring background checks for buyers at gun shows. But nothing they did then was as sweeping as the proposals they took up this year.

Republicans have warned that voters will punish Hickenlooper and other Democrats who voted in favor of the measures.

“I’m telling you, they have overreached, and there are going to be electoral consequences,” said Republican Sen. Greg Brophy.

Republicans have said limiting magazine sizes will drive jobs from the state, and ultimately won’t prevent criminals from getting larger magazines in other states.

One Colorado-based manufacturer of ammunition magazines disclosed plans to relocate because of the new restrictions.

Some county sheriffs opposed the new background checks, arguing the move is unenforceable and endangers Second Amendment rights.