(Bloomberg) -- Texas Governor Greg Abbott’s lead over his Democratic challenger ahead of November’s election has narrowed amid a contentious debate on gun control and abortion policy in the Lone Star State.

About 45% of registered voters are in favor of electing the Republican Abbott to a third term, while 39% support his Democratic opponent, Beto O’Rourke, according to a University of Texas and Texas Politics Project poll released Wednesday. The results indicate a tighter gubernatorial race than just two months ago when a similar poll showed Abbott with an 11-point lead.

The shift suggests recent events like the state’s near-total ban on abortion, even before Roe v. Wade was overturned by the Supreme Court, and the Uvalde school shooting have ignited more support for O’Rourke, a former congressman from El Paso.

“I’m not ready to say this is a tied race, or that Beto is no longer the underdog,” said James Henson, the director of the Texas Politics Project. “But certainly the shift in the environment has been, in strictly political terms, helpful to Beto O’Rourke.”

The polling also showed that most Texans don’t support policies that state Republicans prioritized in last year’s legislative session. Only 15% of Texans agree that abortion should never be permitted, a position at odds with a bill passed last year that will ban the procedure once the Supreme Court’s ruling takes effect.

Additionally, a majority of Texans expressed support for gun control measures like “red flag laws” or expanded background checks. The survey was taken after the Uvalde shooting in May, which killed 19 schoolchildren and two teachers, and reignited debate about easy access to powerful firearms.

Despite the polls suggesting a tighter race between Abbott and O’Rourke, the Democratic candidate still has much to overcome. Democrats nationally may be at a disadvantage due to the dwindling popularity of President Joe Biden amid high inflation and recession fears. And O’Rourke is running in a Republican stronghold, with no Democrat having been elected to statewide office since 1994.

The poll surveyed 1,200 registered voters in Texas from June 16 to June 24 and it has a margin of error of plus or minus 2.89 percentage points. 

©2022 Bloomberg L.P.