Updated

Tea Party-backed candidate state Sen. Dan Patrick defeated three-term incumbent David Dewhurst for the Republican nomination for Texas lieutenant governor Tuesday after a nasty race that evolved into personal attacks.

Patrick, a fiery radio talk show host who founded the Tea Party caucus in the Texas state legislature, ousted Dewhurst after a campaign full of attack ads and mudslinging over which candidate was more conservative.

The race hit a flashpoint in recent weeks when Patrick's private medical records were released to reporters. The records revealed Patrick had been treated for depression in the 1980s.

The medical history on Patrick, drawn from a criminal and civil court case, was released by Texas Land Commissioner Jerry Patterson, who finished fourth in the primary but later endorsed Dewhurst.

The records chronicle psychiatric hospital stays in 1982 and 1986 in which Patrick "needed sitters around the clock for being severely depressed." Patterson says the information was "not leaked, but in the public domain for 25 years."

Patterson claimed to not be working for the Dewhurst campaign, and Dewhurst's campaign asked him to stop the document dump. Patrick accused Dewhurst of lying about using Patterson as a surrogate, and then attempting to cover it up.

The loss likely ends Dewhurst's political career. The Houston energy mogul and Gov. Rick Perry's sidekick for the past 12 years has held statewide office since 1999 but has said this would probably be his final campaign.

It is not the first time Dewhurst has been bested by a Tea Party underdog. He famously lost the race for the Republican primary to now-Sen. Ted Cruz in 2012, after spending about $20 million of his own fortune. He spent another $5 million against Patrick.

Patrick's victory is another boost to the Tea Party, which has struggled to gain momentum this election year.

Another boost for the movement was the victory of Tea Party favorite Ken Paxton, who won the Republican nomination for Texas attorney general after a bruising runoff against fellow lawmaker Dan Branch. Paxton is now the favorite to replace Attorney General Greg Abbott, who is running for governor. He faces Democrat Sam Houston.

Dentist Brian Babin won the Republican nomination for the suburban Houston seat being vacated by U.S. Rep. Steve Stockman, easily beating Houston investment banker Ben Streusand. Stockman originally filed to run for re-election to Congress.  But he changed his mind in December, and instead unsuccessfully challenged powerful U.S. Sen. John Cornyn in the Republican primary.

Meanwhile, former lawmaker Sid Miller won the Republican nomination for Texas agriculture commissioner after a runoff boosted by a rare endorsement from Gov. Rick Perry. He will face off against little-known rancher Jim Hogan, who defeated singer and humorist Kinky Friedman to claim the Democratic nomination.

On the Democratic side, Dallas dental mogul and former major GOP donor David Alameel defeated perennial candidate Kesha Rogers to win the Democratic nomination for U.S. Senate.

The Lebanon-born Alameel traveled to Afghanistan in 2000 to negotiate with the Taliban about the possible handover of Usama bin Laden to U.S. authorities, but those talks stalled after the Sept. 11 attacks.

Alameel says money will be no object in the race.  He long donated to both parties but now says Republicans are too extreme.

Alameel will face off against Republican Sen. John Cornyn in November.

The Associated Press contributed to this report