The Colorado theatre shooting has put the two candidates for president on the spot about their stances on gun control

The tragic events that unfolded inside a Colorado movie theatre on Friday have prompted greater attention on the gun law stance of the two men fighting it out to lead the US.

Within hours of the news that a gunman had shot dead 12 and injured many more, New York mayor Michael Bloomberg presented President Barack Obama and Republican challenger Mitt Romney with a stark challenge over America's loose restrictions on gun ownership.

"Maybe it's time the two people who want to be president of the United States stand up and tell us what they're going to do about it, because this is obviously a problem across the country."

A look at the White House rivals' stance on the issue shows that both have evolved on the issue, but not in the way that those like Bloomberg would want.

Romney signed a ban on assault weapons as Massachusetts governor, but as the presumptive Republican nominee, he now bills himself as the candidate who will protect gun owners' rights.

Obama called for reinstating the federal ban on assault weapons during his 2008 presidential campaign. But since his election, he hasn't sought to get that done or pushed other gun control proposals.

Here's a glance at how both candidate's views and comments on gun laws have evolved over the years:

Barack Obama

1997-2004: As an Illinois state senator, Obama supports banning all forms of semi-automatic weapons and tighter state restrictions generally on firearms, including a failed effort to limit handgun purchases to one per month.

2005: In the US Senate, Obama votes against protecting firearms makers and dealers from lawsuits over misuse of their products by others. The bill is signed into law by President George W Bush.

2008: During his first presidential campaign, Obama supports a return to the federal ban on assault weapons, which began during the Clinton administration and expired under Bush. He also endorses requiring background checks for buyers at gun shows. The National Rifle Association attacks him as an anti-gun zealot – a stand the group continues to take today.

April 2008: Obama is criticised for elitism after sounding dismissive of gun owners in a talk to campaign donors. He said voters in struggling small towns in middle America "cling to guns or religion or antipathy to people who aren't like them" to explain their frustrations.

September 2008: Obama seeks to reassure gun owners: "I believe in people's lawful right to bear arms. ... There are some common-sense gun safety laws that I believe in. But I am not going to take your guns away." Nonetheless, gun sales go up when Obama wins, apparently because of fear that new restrictions are imminent under his administration.

2009: As president, Obama signs a law allowing people to carry concealed weapons in the Grand Canyon, Yellowstone and other national parks and wildlife refuges and another that lets people carry guns in their checked bags on Amtrak trains.

2010: The Brady Center to Prevent Gun Violence gives Obama a grade of "F" for failing to push even the gun restrictions he supported while campaigning.

2011: Obama says the shooting that severely wounded then-Representative Gabrielle Giffords and killed six people should lead to "a new discussion of how we can keep America safe for all our people". He calls for "sound and effective steps" to keep guns out of the hands of criminals, including strengthening background checks on gun buyers. But he's short on specifics, and the Obama administration hasn't proposed any new gun initiatives since then.

March 2012: Obama calls the fatal shooting of black teenager Trayvon Martin by a neighborhood watch volunteer in Florida "a tragedy", saying Americans should do some soul-searching and "examine the laws" to figure out why it happened. He hasn't called for any legal changes in response to the case, which mostly brought attention to some states' stand-your-ground laws making it easier for a shooter to claim self-defence. Indeed, most gun regulations are imposed by states. The primary federal law is the Brady law requiring background checks on firearms purchasers.

July 20: Obama says he's heartbroken by the Aurora movie theatre massacre and calls for Americans to unite in prayer for the victims: "If there's anything to take away from this tragedy it's the reminder that life is very fragile, our time here is limited and it is precious."

Asked whether the mass shooting should prompt a new review of gun laws, White House spokesman Jay Carney declines to comment beyond reiterating Obama's existing stance in support of "common-sense measures that protect second amendment rights of Americans, while ensuring that those who should not have guns under existing law do not get them".

Mitt Romney

1994: In his unsuccessful challenge to liberal Democratic senator Edward M Kennedy, Romney sounds moderate on guns, supporting an assault weapons ban and insisting, "I don't line up with the NRA."

2002: Running for governor of Massachusetts, Romney says he supports and will protect the state's "tough gun laws". The NRA gives his Democratic opponent a higher rating on gun-rights issues and makes no endorsement in the race.

2003: As governor, Romney upsets gun owners by signing a law that quadruples the state's gun-licensing fee – from $25 to $100 – as part of a widespread effort to eliminate the budget deficit.

2004: Romney signs a Massachusetts ban on assault weapons. He mollifies many gun rights advocates by coupling it with looser rules on gun licenses and an extension of the duration of licenses, reducing the effect of the earlier fee increase.

2005: Declares May 7 Right to Bear Arms Day in Massachusetts.

2006: As he prepares for his first presidential run, Romney becomes a lifetime NRA member.

2007: While campaigning, Romney declares he sometimes hunts "small varmints" – a comment ridiculed by some as an awkward attempt to pander to pro-gun voters.

2008: In a Republican primary debate, Romney says he would have signed the federal assault weapons ban if it came to his desk as president, but he opposes any new gun legislation.

2011: Making his second presidential bid, Romney's campaigns on a promise to protect and promote the second amendment.

2012: Romney tells gun owners that Obama wants to erode their rights. "We need a president who will enforce current laws, not create new ones that only serve to burden lawful gun owners," Romney told the National Rifle Association's annual convention. "President Obama has not. I will."

July 20: Like Obama, Romney avoids talking politics on the day of the Aurora shooting. He says Americans are coming together in their sorrow: "There is something we can do. We can offer comfort to someone near us who is suffering or heavy laden, and we can mourn with those who mourn in Colorado."