GREENVILLE, S.C. (AP) — Ted Cruz has always talked about the Supreme Court as a candidate for president, but it’s become the new focal point of his White House bid following the weekend death of Justice Antonin Scalia.

The Texas senator on Monday recast the stump speech he’s offered voters for the past several weeks to highlight the importance of electing a conservative who will appoint what he called the right kind of justices to the Supreme Court, which he described as currently being "activist" and "out of control."

Cruz argued before the Supreme Court nine times by age 40, winning two cases and losing four, with three cases having a murkier outcome. He says that gives him alone "the background, the principle, the character, the judgment" to find a solid conservative to replace Scalia.

The tea party darling also has vowed to filibuster any nominees offered by President Barack Obama, saying one more liberal Supreme Court justice could wipe out state-level abortion restrictions while undermining religious liberty and curtailing gun ownership.

"This presidential election is the turning point between either prevailing or losing that fight for a generation," Cruz told a crowd in Florence, South Carolina.

A graduate of Harvard Law School, Cruz clerked for Supreme Court Chief Justice William Rehnquist. His high court arguments were the bedrock of his underdog Senate victory in Texas and are woven into the DNA of his presidential run.

If elected, Cruz would be the ninth president to have argued before the Supreme Court, but the first since Richard Nixon in 1966, according to The American Bar Association. Cruz constantly reminds audiences he defended states’ rights, gun rights, the Ten Commandments and capital punishment before the high court.

He doesn’t suggest he won every case, but Cruz’s defeats can get lost in translation. While canvassing for Cruz in Iowa last month, a volunteer visiting from Georgia proclaimed to caucus-goers that her candidate "won every one" of his nine cases.

Cruz did prevail in his final Supreme Court appearance. He won a patent infringement case in 2011 involving a deep fat fryer while working for a private Houston law firm.

His other eight appearances came during his five years as Texas solicitor general, a job he took on in 2003 at 32. Cruz didn’t get to pick his own cases as he argued for Texas. But then-Texas Attorney General Greg Abbott, now the state’s governor, encouraged him to join out-of-state cases that could promote conservative values.

"Ted Cruz was tireless in searching for every possible opportunity, not just to talk about, but to implement and execute, a conservative constitutional vision for the country," said James Ho, Cruz’s successor as Texas solicitor general.

In his first Supreme Court case in 2003, Cruz argued Texas shouldn’t have to honor an agreement to improve health coverage for poor children. He lost 9-0.

The following year, Cruz implored the Supreme Court to uphold a 16-year prison sentence for a man convicted of stealing a calculator from Wal-Mart. The justices remanded the case to a lower court, which sentenced the man to time served.

The case Cruz most trumpets brought him to the Supreme Court twice and involved a Mexican national named Jose Ernesto Medellin.

Medellin was convicted of the rape and murder of two teenage girls in Houston in 1993, but wasn’t notified of his right to contact Mexican diplomats upon arrest, as dictated by the 1963 Vienna Convention. The International Court of Justice ruled in 2004 that U.S. courts should review the convictions and sentences for Medellin and 50 other Mexican-born prisoners because of the treaty violation.

President George W. Bush directed state courts to review such cases, and Texas sued.

"It was an unusual circumstance," Cruz, who once worked for Bush’s presidential campaign and administration, told The Associated Press in 2014. "Especially when the president was a Texan, was a Republican and was a friend."

The Supreme Court first sent the case back to state courts. Upon hearing it a second time, the justices sided with Texas 6-3 and Medellin was executed.

In 2006, Cruz defended congressional redistricting maps drawn by Texas’ GOP-controlled Legislature. The Supreme Court didn’t declare them unconstitutional, despite claims they deliberately dispersed the voting power of the state’s growing Hispanic population. But it did rule that a sprawling South Texas congressional district had to be redrawn.

Two more Cruz Supreme Court arguments came in 2007 and involved the death penalty.

Cruz argued a man convicted of killing a former Taco Bell co-worker should be executed despite the jury not being instructed to consider several factors, including his having been abused as a child. Cruz also defended the death sentence of a killer whose schizophrenia meant he might not be able to understand why he was being executed. He lost both 5-4.

Cruz also lost 5-4 his final case as solicitor general, an unsuccessful defense of states’ imposing the death penalty in cases of child rape. It originated in Louisiana, but Cruz served as lead attorney for 10 states.

In his filings, Cruz overlooked that in 2006, Congress had modified the military’s justice code to add child rape as a crime punishable by death. He was so worried that The New York Times would write that his office "screwed up by not finding" that statue that he wrote to another attorney via email: "Would love to have some sort of response, so we don’t look silly."

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox