By Keith Coffman
The measure passed the state Senate 19-14 and the state House 36-27, without the support of a single Republican member in either chamber.
The vote followed months of debate on gun control in Colorado, and came after legislators approved four other gun control measures on Wednesday.
The legislation now awaits the signature of Governor John Hickenlooper for final approval. Hickenlooper, a Democrat, has indicated he supports universal background checks for gun buyers but has not said if he would sign the bill.
It was approved by both chambers of the Democratic-controlled Colorado legislature after last-minute amendments were worked out in a conference committee. Two Democrats voted against the bill, one in the state senate and one in the house.
"This bill as amended strikes an important balance between ensuring that the bill reduces the number of guns in the hands of criminals while allowing all law-abiding citizens to purchase the guns of their choice," state Senator Morgan Carroll said following Senate approval.
But Republican House minority leader Mark Waller said the legislation would not fulfill its stated purpose.
"If the goal is to enhance public safety, this bill won't do it. If a criminal wants to perpetrate a crime he can still get a gun," Waller told Reuters on Friday.
On Wednesday, the Colorado legislature approved a package of four other gun control measures, including a controversial ban on ammunition magazines with more than 15 rounds, which Hickenlooper has said he would sign into law.
Republican legislators have largely opposed the measures, and Waller earlier this week called Democrats "out of touch" with their constituents for focusing on gun control when more than 200,000 people in the state are out of work.
Passage of the bills could push Colorado to the forefront of a national gun control debate reignited by several mass shootings last year, including the December massacre of 20 children and six adults at a school in Newtown, Connecticut.
That followed a mass shooting in Colorado in July when a gunman opened fire in a crowded premiere of the Batman movie "The Dark Knight Rises" in the Denver suburb of Aurora, killing 12 people and wounding 58.
Former University of Colorado neuroscience graduate student James Holmes, 25, has been charged with multiple counts of first-degree murder in that case.
Colorado was also the site of the 1999 massacre at Columbine High School, where two teenagers shot dead a teacher and 12 other students before committing suicide. Several of the guns used in that attack were bought at gun shows.
Following Columbine, the state closed a loophole that allowed firearms purchases at gun shows without a background check.
Other gun-control bills already approved by Colorado lawmakers include a measure to make firearm buyers pay for their own background checks and a ban on online certification for concealed-carry permits, both of which Hickenlooper has said he supports.
Another measure would bar gun purchases by people convicted of domestic violence crimes.
The Colorado legislature's action follows the passage in New York state in January of a sweeping gun-control law that bans assault weapons and magazines that hold more than seven rounds of ammunition, requires gun owners to register most guns with the state and requires universal background checks.
President Barack Obama has put forward a number of federal gun-control proposals following the Newtown killings.
On Tuesday, a divided U.S. Senate Judiciary Committee advanced to the full Senate a measure endorsed by Obama that would require criminal background checks for all gun buyers.
(Writing by Dan Whitcomb; Editing by Cynthia Johnston, Mohammad Zargham and David Brunnstrom)