As a teenager growing up in Houston, Ted Cruz memorized the U.S. Constitution word for word. It was the beginning of what those who know the Republican Senate candidate say has been a lifetime commitment to his interpretation of the document.

Described by friends and political analysts in Texas as a “thinker,” Cruz’s upstart campaign and big primary victory Tuesday over Lt. Gov. David Dewhurst, a better-known establishment candidate, placed him in another category overnight: political rock star.

“With his resounding victory and [Texas Gov. Rick] Perry’s stunningly bad presidential run, he is now the most important person in the Republican Party in the state,” said Sean Theriault, a professor at the University of Texas who studies the Senate. “His message of being an unapologetic and uncompromising conservative was in the driver’s seat the entire campaign.”

Later this year, Cruz, 41, is expected to easily beat his Democratic opponent.

The former state solicitor general began the race last year with low name-recognition, having spent years in the legal field. The career highlights he campaigned on include the 70 briefs he wrote to the Supreme Court and arguments he worked on defending the Ten Commandments monument on the Texas State Capitol grounds, the recitation of the Pledge of Allegiance in public schools and a redistricting plan.

“First and foremost a convicted idealist, he believes in the ideas above all else,” said Brooke Rollins, chief executive of the Texas Public Policy Foundation, who has known Cruz for a decade.

As a fellow at the foundation, Cruz helped build its Center for Tenth Amendment Studies and wrote reports outlining how states could opt out of federal programs.

The Senate run surprised some who know Cruz, who once aspired to be the state’s attorney general. At Princeton, he was a champion debater. He went on to Harvard Law, where he was a founding editor of the Latino Law Review.

“He was not afraid to be a conservative even among the liberal intelligentsia at Harvard,” said fellow Harvard Law grad Hunter Bates, president of Bates Capitol Group and a former chief of staff to Sen. Mitch McConnell (R-Ky.).

Bates remembers Cruz as “extremely engaging and energetic on a personal level” and a talented actor, who had the starring role in Arthur Miller’s “The Crucible” during his first year as a law student. After law school, Cruz became Chief Justice William H. Rehnquist’s first Hispanic clerk.

Polls last summer projected Cruz would receive 2 percent of the vote but he quickly pulled in the support of the state’s tea party movement and big-name backers, including Sen. Jim DeMint (R-S.C.), former Alaska governor Sarah Palin and columnist George F. Will.

Said Sen. Rand Paul (R-Ky.), an early Cruz backer: “In the past, it was just whoever the party picked, and a lot of times what rose to the top was mildness, blandness, lack of conviction, lack of principle.”

Cruz was also helped by his personal narrative. He was born Rafael Cruz in Canada, where his Cuban father and Irish American mother had moved for the 1960s oil boom. All Cruz remembers about Canada is that “it was cold.”

Cruz built his career in Texas. After a few years in private practice, he met Joshua B. Bolten, George W. Bush’s campaign policy director. Cruz became a domestic policy adviser to Bush during the 2000 presidential race and on the campaign he met his wife, Heidi Nelson Cruz, another policy adviser.

After returning to Texas, Cruz worked in private practice for Morgan Lewis, where he defended some corporate interests that Dewhurst used in attack ads.

Comparisons are already being made between Cruz and Sen. Marco Rubio (R-Fla.), another tea party favorite with Cuban roots. But he may have more in common with freshman Sen. Mike Lee (R) of Utah — a tea partyer who unseated longtime Sen. Robert F. Bennett(R), said Jennifer Duffy, an analyst with the Cook Political Report. Cruz said he sees the parallels.

“Conventional wisdom was that he didn’t have a chance,” Cruz said in an interview earlier this year. “2010 showed that money and the establishment are not what they used to be.”

Paul Kane and Rachel Weiner contributed to this report.