Republican presidential candidate Sen. Ted Cruz (R-TX) looks over a handgun handed to him by a supporter during a campaign event at CrossRoads Shooting Sports gun shop and range on December 4, 2015 in Johnston, Iowa. (Scott Olson/Getty Images)

Ted Cruz strode Friday into a shooting range here, where assault rifles and handguns were displayed on the walls and boxes of ammunition were stacked up for sale, to deliver tough talk following this week’s massacre in California.

“You don’t stop bad guys by taking away our guns. You stop bad guys by using our guns,” Cruz thundered to a roomful of Second Amendment activists. The Republican senator from Texas vowed that after he is elected president, any “lunatic” or “jihadist” who attempts to harm innocent Americans will “encounter the business end of firearms.”

There was a time when politicians professed their enthusiasm for gun rights by donning camouflage and hunting pheasants. Now, Republican presidential hopefuls campaign in active shooting ranges. They invite the media to watch them fire assault rifles or demolish the tax code with an AR-15. Or, as Cruz did in August, they wrap strips of raw bacon around the barrel of a machine gun to cook them with the heat of gunfire.

“Machine-gun bacon,” Cruz said in a video, taking a piece of meat off the gun to taste it. “Ha-ha, ha-ha.”

Republican politics have hardened from gun rights to gun pride, as candidates embrace and show off the more militaristic features of weaponry.

Presidential hopefuls spoke about law enforcement, terrorism and gun control following the shooting in San Bernardino, Calif. (Sarah Parnass/The Washington Post)

“If you’re a Republican candidate these days and can’t handle a firearm, all you can run for is the border,” said Mark McKinnon, a veteran GOP media strategist. “Republicans are all about being tough on crime, tough on terrorism and just plain tough.”

But the flashy displays of machismo come at a time of heightened anxiety for many Americans because the weapons displayed at such events are often the same or similar to the types of guns being used for mass murder with greater frequency, such as the recent shootings in San Bernardino, Calif., and Colorado Springs.

Dan Gross, president of the Brady Campaign to Prevent Gun Violence, called the Republican field’s eagerness to campaign at shooting ranges and other firearms facilities “shameful” and “disturbing.”

Gross said the candidates “are all just trying to outdo each other to try and demonstrate that this is a debate over constitutional rights rather than what it is, which is a debate over what we can do to keep guns out of the hands of people that shouldn’t have them.”

Most of the 14 GOP presidential aspirants agree on gun policy — they oppose further restrictions, such as universal background checks for purchases or banning assault weapons. The near-unanimity on the issues means that candidates are trying to differentiate themselves with imagery and optics, attempting to appeal to the GOP’s most intense gun-rights supporters.

“In the Republican coalition, Second Amendment folks are a high-propensity group,” GOP strategist Rick Wilson said. “They will come out to vote. They will walk through icy rain. They will walk through blazing heat.”

Former Arkansas Governor Mike Huckabee prepares to shoot guns at the Granite State Indoor Range and Gun Shop in Hudson, N.H. in April. (Jabin Botsford/The Washington Post)

Fergus Cullen, a former state GOP chairman in New Hampshire, said many Republican stalwarts in his gun-loving, Live-Free-Or-Die state are gun-rights activists.

“The absolutists on gun rights — allow guns on campuses, arm high school teachers, et cetera — are loudest and get the most attention,” Cullen said.

This explains why, with two months until the Iowa caucuses kick off the 2016 nominating contest, Cruz staged an event at CrossRoads Shooting Sports in the Des Moines suburb of Johnston.

This was Cruz’s second visit to CrossRoads; his first, in June, generated controversy when the Associated Press released a photograph depicting a poster image of a gun aimed at the candidate’s head. Cruz shot targets in the range during his June visit, though he did no shooting on Friday.

At Friday’s event, Cruz sought to portray himself as the presidential field’s toughest defender of gun rights. He announced a national Second Amendment coalition, which includes more than 24,000 people. One of the coalition’s leaders, Sgt. Patrick Perkins, who is a co-founder of the veterans group Heroes Hunting, had a handgun in his waist holster as he introduced Cruz. On the side of the room hung a poster explaining, “What happens when the trigger is pressed?”

Cruz spoke briefly about the San Bernardino shooting, saying it was the product of “the evil of radical Islamic terrorism.” He warned of the dangers of “disarming the citizenry.” The Second Amendment, he said, not only grants people the right to keep and bear arms to protect their families, homes and lives but also is a “fundamental check on government.”

“We need to target the bad guys,” Cruz said. “But on the flip side, what is it that keeps us safe? What keeps us safe is we are free people who have the God-given right to protect our homes, our families and our lives.”

Cruz is hardly the only candidate who plays up his affinity for firearms. Some others, such as Sen. Lindsey O. Graham of South Carolina, grew up in rural cultures and have been building their gun collections since childhood. Graham rose before dawn one Saturday in June to shoot skeet with about two dozen donors in Utah.

Before a televised debate at the Ronald Reagan Presidential Library in September, Sen. Rand Paul (R-Ky.) stopped at a nearby gun range and shot at a stack of boxes labeled “IRS Tax Code” with an AR-15 assault rifle. As Paul coolly fired at his target, his instructor praised his aim after each loud, booming shot.

“Right in it,” the man told him. “Perfect.”

The Facebook pages of former Arkansas governor Mike Huckabee and former Pennsylvania senator Rick Santorum feature videos of them at gun ranges in key early voting states.

One shows Huckabee in orange earmuffs and protective glasses firing five shots in 10 seconds at an Iowa range. Afterward, he inspects where his shots hit his target, which was a silhouette of a human torso.

In another, Santorum shoots an AK-47 assault rifle at a South Carolina range.

“That’s pretty intense!” he says.

Other candidates with more city-slicker backgrounds, such as New Jersey Gov. Chris Christie and former Florida governor Jeb Bush, have shied away from such blatant gun worship. Christie and Bush do not own guns, a Washington Post review of the Republican field conducted earlier this year found. Sen. Marco Rubio (R-Fla.) owns a handgun, but he has not held any campaign events at shooting ranges this year.

Democratic leaders have tried to exact a political cost on Republican reluctance to give any ground in their staunch defense of gun rights. They pushed two gun-control measures in the ­GOP-controlled Senate on Thursday. One would have expanded background checks for guns purchased online and at gun shows. The other would have prevented individuals on the terrorism watch list from purchasing firearms.

Both failed.

“The gun show thing — it’s not a ‘gun show loophole.’ People keep saying that. It is an individual — I decide I want to sell my gun to a friend of mine. So now you have put an extraordinary burden on me to go out and conduct a background check, and I’m liable if I get it wrong,” Rubio said Friday on “CBS This Morning.”

Campaigning Friday in Sioux City, Iowa, Democratic front-runner Hillary Clinton, a vocal gun-control advocate, struck a note of amazement in saying that the Senate voted down “a bill that would have prevented anyone on the no-fly list from buying a gun.”

“If you’re too dangerous to fly in America, you’re too dangerous to buy a gun in America,” she said.

Back in Johnston, Cruz told the crowd of gun enthusiasts that they “scare the living daylights out of a whole lot of folks,” including Clinton. He urged them — “passionate fighters,” he called them — to arm themselves to protect their families.

As Cruz shook hands and posed for pictures following his remarks, one could hear the piercing sound of gunfire. Target shooting had commenced.

Sullivan reported from Washington. Anne Gearan contributed to this report.