Ted Cruz defeated Rep. Beto O’Rourke in his bid for re-election for U.S. Senate race in Texas, NBC News reports. 

O’Rourke trailed behind Cruz in recent polls but raised a significant amount of money in his campaign.

An O’Rourke victory was seen as a long shot in a state that is politically red with Republicans holding a majority of the House seats, both Senate seats and the governorship, but the Democratic representative energized Democrats within the state and around the country.

Cruz’s victory ensures that Republicans will keep control of the U.S. Senate, securing President Donald Trump’s judicial picks for the next few years.

According to Vox, Cruz’s campaign talking points centered on gun control, repealing Obamacare and denying undocumented immigrants a path to citizenship.

The Texas Senator also labeled O’Rourke as someone who was too progressive for Texas, which tends to vote more conservatively.