Sen. Ted Cruz (R-Texas) leads Rep. Beto O'Rourke (Texas), his likely Democratic opponent in November, by single digits, according to a new poll conducted by a left-leaning firm.

End Citizens United, a campaign finance reform group, released a poll conducted by Public Policy Polling that finds Cruz leading O'Rourke by 8 points, 45 to 37 percent. Eighteen percent were undecided.

Wednesday's poll is in contrast with an internal poll from Cruz's campaign earlier this month that showed the GOP senator surging ahead of O'Rourke by 18 points. The survey also found that O'Rourke struggles with name recognition compared to Cruz.

In the first poll, both Cruz and President Trump have negative favorability ratings in Texas. Thirty-eight percent view Cruz favorably, while 49 percent view him unfavorably. For Trump, who won Texas by 9 points in the 2016 election, 45 percent view him favorably, compared to 48 percent who view him unfavorably.

O'Rourke has a positive favorability rating in the poll, 20 percent to 19 percent, but 61 percent are unsure of how they view the congressman, who has served in Congress since 2013.

Democrats have an uphill battle in Texas's Senate race, but they've been feeling more bullish on elections in redder states given recent upsets in GOP strongholds. Still, no Democrat has won a Senate election in Texas since 1988.

Cruz was first elected to the office easily in 2012, taking more than 56 percent of the vote.

The poll was conducted from Jan. 17 to 18 and surveyed 757 Texas voters via phone and internet. The margin of error was 3.6 percentage points.