After a long negotiation, the suit was settled with a consent decree—a roughly 80-page agreement that spelled out how Texas would improve its Medicaid program to come into compliance with federal standards. But the plaintiffs didn't think Texas was making the improvements it had agreed to, and they sued again to enforce the decree.
Cruz argued that enforcing the agreement would violate the 11th Amendment, which gives the states sovereign immunity. But the Court's conservatives weren't buying it.
"They gave up their lawsuit and, you know, packed up and went home. And you're telling them that they accomplished nothing by doing that," Justice Antonin Scalia said to Cruz during oral arguments. "Why would the other side ever accept such a consent decree? It's crazy."
Cruz lost, 9-0.
(RELATED: Ted Cruz, the Obamacare Candidate)
Just a few years later, though, he was back before the high court to argue the case that would ultimately be his biggest victory as solicitor general: Texas's repeated efforts to execute Jose Medellin, a Mexican national convicted of rape and murder.
Medellin's case was a big part of Cruz's Senate campaign in 2012, and it is sort of a perfect storm of conservative issues. It allowed Cruz to simultaneously defend a death sentence, put American courts before international ones, and even take a swipe at the president for overstepping his authority.
Medellin was sentenced to death for his role in the rape and murder of two teenage girls. He confessed to the crimes, even after local police read him his Miranda rights.
But the police did not inform Medellin that, under the terms of a 1969 treaty known as the Vienna Convention, foreign nationals arrested inside the U.S. have the right to seek assistance from their home country's consulates.
The International Court of Justice ruled that the U.S. had violated the Vienna Convention by failing to notify more than 50 suspects, including Medellin, of their right to call their consulates. The U.S. had to reconsider those convictions, the International Court said.
And though it wasn't clear whether American courts were actually bound by that decision, then-President George W. Bush said state courts in the U.S. would respect the ICJ's ruling.
Cruz urged the Supreme Court to disregard both the international ruling and Bush's assessment of it, and to let Texas's sentence stand.
(RELATED: Ted Cruz Opens 2016 As the Election's Self-Declared Conservative Champion)
"This is a very curious assertion of presidential power. Because the presidential power is not directed at the federal courts. It is directed at the state courts, and the state courts alone. And I would submit is the only instance I'm aware of, of a federal mandate that falls only on the states, singles out the states, and commandeers those judges. In over 200 years of our nation's history, I'm not aware of any other directive from the president directly to the state courts and state judges," Cruz said during oral arguments.