He bragged to co-workers about having ties to terrorist groups, including al-Qaida and Islamic State. He talked about wanting to become a martyr. He was the subject of two separate FBI investigations. He beat his wife so badly that her family had to come to Florida and rescue her.

There were seemingly endless red flags that could have popped up when Omar Mateen walked into a central Florida gun store earlier this month to purchase the weapons he would later use to kill 49 people and wound more than 50 others at a gay night club in Orlando in what is the worst mass shooting in U.S. history.

Yet Mateen, who pledged allegiance to Islamic State moments before the early Sunday shooting, was able to legally purchase the Sig Sauer MCX (a variation of the popular, military-style AR-15 rifle) and a Glock 17 handgun.

Infographic on AR-15 Gun

The apparent ease with which Mateen secured the weapons used in the massacre has revived a debate over whether those with suspected extremist ties should be able to purchase firearms — increasingly the weapon of choice for those carrying out terrorist attacks in the U.S.

Since the September 11, 2001, terror attacks, 85 percent of people killed by terrorists in the U.S. were killed by guns, according to an analysis by the FiveThirtyEight website. That figure, which was based on data from the Global Terrorism Database, did not take into account the shooting in Orlando.

The reason terrorists are using guns is that they are "readily available, and they have a better ability to kill with precision," said Malcolm Nance, a former counterterrorism and intelligence officer, who now heads the Terror Asymmetrics Project (TAPSTRI).

"All you have to do is close the doors, and everyone in front of you is going to be a victim," Nance said. "It doesn't take a political analyst or someone with counterterrorism experience to know that that could be the most highly charged type of attack in the United States."

'Terror loophole'

The increased use of guns in terrorist attacks has led many to speak of a "terror loophole" in U.S. gun laws.

The debate has largely fallen along party lines: Democratic lawmakers generally support the gun control restrictions on terror suspects and Republican lawmakers for the most part oppose them.

Last December, Senate Republicans voted down a proposal to block terror suspects from buying guns and explosives. That effort followed the San Bernardino terrorist shooting that killed 14 people.

Following the Orlando shooting, several Democratic lawmakers were quick to push for another vote as soon as possible.

A man holds a scrolling message about guns on his smart phone at a candlelight vigil in West Hollywood, California, following the early morning attacks on a gay night club in Orlando, Florida, June 12, 2016.

Senate Democratic Minority Leader Harry Reid said Monday there is "no excuse" for the fact that terror suspects can "walk into a gun store and legally purchase assault weapons and explosives."

Democratic Senator Chuck Schumer said he will work to put the issue up for a vote as soon as possible.

"If that legislation had been in effect, it is very likely that the FBI would have been able to block the purchase of these two weapons by Mr. Mateen," he said.

Campaign issue

Gun control measures have also been widely discussed on the presidential campaign trail.

"If the FBI is watching you for a suspected terror link, you shouldn't be able to just go buy a gun with no questions asked," presumptive Democratic presidential nominee Hillary Clinton said in a speech Monday.

Donald Trump, the likely Republican presidential nominee, said last November that people on a terror watch list should "absolutely" not be allowed to purchase a firearm. But he also argued that "if people are on a watch list, this is already covered in the legislation we already have."

But it isn't clear whether any of the proposals would actually have prevented Mateen from purchasing the guns he used in the massacre.

The 29-year-old worked as a security guard and had a permit to carry a concealed weapon.

U.S. presidential candidates Hillary Clinton, left, and Donald Trump have both spoken out about gun control laws and the mass shooting early Sunday in Orlando, Florida.

FBI officials had put Mateen on a federal terror watch list, as a result of 2013 and 2014 FBI investigations into his "inflammatory statements" and past ties with a U.S. citizen who had gone to fight with Islamic extremists in Syria. He was pulled from the list, however, after no conclusive evidence was found that suggested he was actually linked to terror groups.

That represents a failure of law enforcement, not a failure of gun laws, according to Sean Davis, a gun rights advocate and co-founder of the conservative Federalist web magazine.

"I don't think the solution to terrorists killing Americans is to eliminate due process for Americans," Davis told VOA. "I think the solution is for the federal government to do a lot better job of tracking and apprehending these people and building cases against them when they do appear to be terrorists."

Shouldn't it be harder, though, for terror suspects to purchase weapons? For Davis, it all depends on how you phrase the question.

"When I hear the question, I hear: 'Do you think we should curtail some people's constitutional rights without due process if a bureaucrat puts their name on a secret list somewhere?'" Davis said. "I look at that question, and I say no."

FILE - People look over a table of handguns for sale at a gun show in Kansas City, Missouri, Dec. 22, 2012.

"What's fundamentally important to understand is that we have a gun purchase system in this country that is predicated on speed and making the sale," Everitt told VOA. "Why not have a system that places a priority on caution and then allows due process for the individual involved if they are indeed clean of wrongdoing?"

No progress likely

Since the Orlando shooting, President Barack Obama has focused on the "terror loophole" legislation, presenting it as an issue where both Republicans and Democrats can find a compromise.

"We have to make it harder for people who want to kill Americans to get their hands on weapons of war that let them kill dozens of innocents," Obama said Tuesday. "It is absolutely true, we cannot prevent every tragedy, but we know that consistent with the second amendment there are common sense steps that could reduce gun violence and reduce the lethality of somebody who intends to do other people harm."

Some Republicans, including Congressman Peter King from New York, have also said more restrictions are necessary, but the prospects of progress for now look grim.

"I support it," said King in response to a question from VOA. "But the fact of the matter is, it's not going to pass now."