A new Morning Consult poll shows national security is back at the forefront of voters’ minds following the mass shooting in Orlando that left dozens dead and injured.

In a national survey taken in the days after Omar Mateen’s attack on Pulse, a gay nightclub, almost three out of 10 voters (29 percent) said security was their top issue under consideration when casting their vote — a 10-point increase from a poll in early June. Similar spikes in voters’ concerns about national security were observed following the attacks in Paris, San Bernardino and Brussels.

Security issues are bigger priorities among Republican voters. More than four out of 10 GOP voters (42 percent) listed security as their top issue in Morning Consult’s most recent poll, compared with 20 percent of Democrats and 26 percent of independents.

Presumptive Republican presidential nominee Donald Trump has said that whenever tragedy strikes, his poll numbers “go way up.” That trend bears out following the Orlando massacre, although his 3-point jump is modest at best.

In a head-to-head matchup with presumptive Democratic nominee Hillary Clinton, Trump is gaining ground. He still trails Clinton 42 percent to 40 percent, which is within the margin of error for the poll. He has closed the gap by 3 percentage points from Morning Consult’s previous poll, when he trailed Clinton by 5 points, 42 percent to 37 percent. Seventeen percent of voters in the most recent poll remain undecided.

[table “168” not found /]

In a three-way field that includes libertarian nominee Gary Johnson, Trump and Clinton are tied at 38 percent each. Johnson pulls in 10 percent of the vote, and 14 percent of voters are undecided.

The recent terror attacks also appear to have a strong effect on how voters feel about the country in general. Three-fourths of voters polled say things in the country have pretty seriously gotten off the wrong track. That number, 75 percent, is higher than the 74 percent recorded in Morning Consult polling on Dec. 6, 2015, immediately after the San Bernardino attack.

Republicans (89 percent) are most likely to say the country was off track, but 81 percent of independents agreed with them, compared with 57 percent of Democrats.