– The pro-gun community had reason to be suspicious of Donald Trump.

He wrote in favor of an assault weapons ban and a "slightly longer" waiting period before gun purchases in a 2000 book and accused Republicans of walking "the NRA line." And even as he rebranded himself a "Second Amendment maven" in 2013, he sounded conflicted, suggesting he favored expanded background checks.

No one on either side of the debate seems to know when or why Trump shifted. But they agree that he has become one of the most forceful pro-gun presidents in decades.

Now, after the worst mass shooting in modern U.S. history, Trump faces a gut-check moment. He could not have imagined that within his first year as president he would come under pressure, even from within his typically pro-gun party, to support legislation restricting gun use, however limited — in this case, a ban on so-called bump-fire stocks like the Las Vegas shooter used, which turn semi-automatic weapons into virtual machine guns.

White House officials, both privately and publicly, insist he is not likely to endorse fundamental change, that is, broader gun controls. Meanwhile, the gun lobby is watching.

"When a crisis happens, you can really tell who your friends are," said Dudley Brown, president of the National Association for Gun Rights, which advertises itself as more hard-line on gun rights than the National Rifle Association.

For decades, Trump tried to stake a position between what he called in 2000 "the extremes of the two existing major parties."

In his book that year, "The America We Deserve," Trump accused Democrats of trying to confiscate all guns and Republicans of refusing even limited restrictions because of the NRA's hold on the party.

In a four-paragraph section on guns, Trump wrote that he supported President Bill Clinton's assault-weapons ban along with a brief waiting period for gun buyers.

Eleven years earlier, in a 1989 interview on MSNBC, Trump seemed even more ambivalent about gun rights.

Saying he owned "a couple of guns," he added: "Now, I hate the concept of guns. I'm not in favor of it, except for one thing: The bad guys are going to have them." He would be "all for" a total ban — if "you could take the guns away from the bad guys."

Trump had not renounced those positions as late as 2013, when he told radio host Howard Stern that the focus should be on gun purchasers' medical problems and past records. "It's a very, very difficult subject, but you need guns for protection," he told Stern.

That ambivalence vanished when Trump ran for president. He boasted in a 2015 debate of carrying weapons "on occasion — sometimes a lot."

"Opponents of gun rights try to come up with scary-sounding phrases like 'assault weapons,' 'military-style weapons' and 'high-capacity magazines' to confuse people," Trump said in a campaign position paper. "Law-abiding people should be allowed to own the firearm of their choice. The government has no business dictating what types of firearms good, honest people are allowed to own."

The NRA helped to elect Trump, spending more than $30 million and endorsing him at a point in the campaign when many Republicans were still reluctant to support him.

Trump returned the favor with some of the strongest pro-gun rhetoric ever delivered by a presidential candidate. He told an NRA audience that Democratic rival Hillary Clinton wanted to destroy the Second Amendment and that terrorist attacks in Paris and San Bernardino, Calif., would have been stopped if more victims were armed.

He said of the Paris attackers in the November 2015 incident: "They just stood there and shot everybody."

"If you would have had guns on the other side," he added, "I promise there wouldn't have been 130 people killed and hundreds of people lying in the hospital to this day."

Trump has sought to fortify his gun-loving credentials by association with his sons, Eric and Donald Jr., who have been photographed hunting exotic animals in Africa. "They have so many rifles and so many guns, even I get concerned," Trump joked to the NRA.

He endorsed a national right to carry, regardless of local laws that are restrictive, and promised, on his first day in office, to eliminate restrictions on bringing guns within 1,000 feet of primary and secondary schools.

Trump failed to overturn the federal gun-free-zone law, an action that requires Congress to pass repeal legislation. Yet he has generally pleased the gun lobby since taking office.

After Sunday's Las Vegas attack, Trump echoed rhetoric that the NRA and its supporters often use following mass shootings, saying it was too soon to talk about gun policy. But he and his administration dropped hints that he might be open to discussion in time.

"We'll talk about gun laws as time goes by," Trump said on Tuesday, ahead of a visit to Las Vegas.