Bill Clark/Getty Images

The AP projects that Tea Party star Ted Cruz will win the Texas Republican Senate primary, defeating "establishment" candidate and longtime Lieutenant Gov. David Dewhurst.

In the past several weeks victory for Cruz, the former solicitor general, had begun to look increasingly likely, with polls showing him ahead of Dewhurst, and major national Tea Party stars like Sarah Palin and Sen. Jim DeMint turning out to campaign for him in the final days leading up to the runoff. However, for the bulk of the race Cruz had been the underdog, lacking in the wealth and name recognition enjoyed by Dewhurst, who has been the lieutenant governor under Rick Perry since 2003.

While Cruz, 41, may have had the majority of national star power on his side, Dewhurst, 66, had the backing of many in the Texas political establishment, including Perry. Dewhurst enjoyed a huge financial advantage over Cruz. According to the Center for Responsive Politics, Dewhurst poured $11 million of his own personal fortune- he founded a successful energy company called Falcon Seaboard- into his campaign, spending a total of $19 million, as compared to Cruz's $7 million spent. But ultimately Dewhurst's wallet was no match for Cruz's political prowess.

Cruz painted his opponent as a moderate who would be willing, if not eager, to compromise with Democrats in Congress. Dewhurst has a very conservative record- he's anti-abortion rights, he supports a balanced budget amendment, and on Monday morning he stopped by a Chick-Fil-A to show his support for the restaurant embroiled in a controversy regarding their president's recent comments on gay marriage. Nevertheless, Cruz and his supporters pointed to compromises Dewhurst had made with Democrats in the state legislature, and argued that his record was merely a reflection of Rick Perry's conservative agenda and did not provide an accurate representation of Dewhurst's own governing style.

Get more pure politics at ABC News.com/Politics and a lighter take on the news at OTUSNews.com

The two men battled fiercely, neither imploded at any time, neither veered off their course, and the race remained close throughout the two months in between the state and presidential primary on May 29, when no one candidate received more than 50 percent of the vote, forcing a runoff. But in the end, strong poll numbers, strong surrogates and a slew of outside spending money from Tea Party affiliated groups like "FreedomWorks" and "Club For Growth" came together to give Cruz momentum that carried him over the finish line.

Cruz will go up against Democratic challenger state Rep. Paul Sadler in the fall in the open race to fill the seat left open by Kay Bailey Hutchison's retirement, but he is widely expected to win because of the state's strong Republican leanings.