Rep. Beto O’Rourke is gaining on Republican Sen. Ted Cruz with just days to go before Texans decide who their next senator will be, according to a new poll.

An Emerson University poll released Thursday puts Cruz ahead of O’Rourke by only 3 percentage points, within the 3.7 percent margin of error.

In the Emerson poll, Cruz has 50 percent of the vote, O’Rourke holds 47 percent, and two percent of voters say they are still undecided only three days out from the midterm elections.

While the poll is a positive sign for O'Rourke, every survey has Cruz is ahead, and the RealClearPolitics polls average has him ahead by 6.5 percentage points.

[Related: John Brennan endorses Beto O'Rourke over Ted Cruz in Texas]

A recent CBS 11/Dixie Strategies poll put Cruz ahead of O’Rourke by 10 points. Also this week, Quinnipiac gave Cruz a five-point advantage.

In his campaign to take Cruz’s seat, O’Rourke has brought in $70 million in funding, a hopeful sign for Democrats that a "blue wave" will help win back the House and possibly the Senate.