Sen. Ted Cruz (R-TX) is clinging to a narrow lead in his race for reelection, according to a new poll.

Cruz leads Rep. Beto O’Rourke (D-TX) by just 47 percent to 44 percent, according to the survey from the well-respected pollsters at Quinnipiac University.

His narrow lead, within the poll’s margin of error, is the latest sign that Cruz is in for a tough fight for reelection in the GOP-leaning state.

Texas has been heavily Republican for two decades, Trump carried it by nine points in 2016, and any Democrat running statewide faces a steep uphill battle. On top of that, in the state’s March primary Cruz won double the number of votes O’Rourke did, a sign that the congressman still has a long way to come in getting his name out around the state.

But O’Rourke has been posting huge fundraising numbers — including a stupendous $6.7 million haul in the most recent quarter — and stands poised to be the first well-funded Democrat to run for the Senate since Texas’ changing demographics opened the door a crack to making the state competitive in recent years.

The poll also showed that President Trump is no help to his former primary rival.

Just 43 percent of Texans approve of the job Trump is doing to 52 percent who disapprove, according to the poll — weak numbers that are actually slightly better than some other pollsters have found for the president in the red but blue-trending state.

O’Rourke remains the clear underdog in this fight, but it appears he has a real shot. And if he can pull off a shock victory, he would give Democrats a real boost in their uphill fight to retake the Senate.