In 2003, when Ted Cruz was offered the job as Texas’ solicitor general under newly elected attorney general Greg Abbott, he hardly had to think it over. Neither, for that matter, did Abbott. He had never met Cruz before interviewing him for the position, he told me, but on the basis of that conversation, he was sold. “He had a calm brilliance, almost an elegant brilliance,” said Abbott.

Perhaps more important was that Cruz shared Abbott’s strategic vision for the office. The solicitor general is, in one regard, an attorney general’s field commander, and Abbott told me that he had always aspired to lead the most aggressive operation in the country—even back then, when the federal government was led by George W. Bush. The two of them made it a point, Abbott explained, to monitor legislative developments in every state, so that Texas could volunteer to lead any fight brewing between the states and the federal government.

It was a job that required a certain taste for brawling. Abbott—who is, like Cruz, unusually cerebral—seems to take some pleasure in describing his work that way: “I go into the office in the morning, I sue Barack Obama, and then I go home.” It was also a job that required a flair for strategy and tactics, and Cruz has a talent for both. It’s worth pointing this out, because some of Cruz’s colleagues in D.C. see him as someone without much interest in either, which is partly why back in March, Senator John McCain had dismissed Cruz and several other tea partiers as “wacko birds.”

When I had asked Cruz whether he sees himself as pragmatic or ideological, he had answered the question succinctly— “principled and interested in results”—but later, in his small office in the Capitol, the issue came up again. At times during the year, the senator had seemed to approach things from an abstract or ideological perspective. When the Senate was debating a gun-control bill, for example, after the shootings at Sandy Hook Elementary, he had annoyed Dianne Feinstein, a Democratic senator from California, by asking her whether she would deem it appropriate to abridge the protections laid out in the First and Fourth amendments the same way she was proposing with regard to the Second, prompting her to snap at him, “I’m not a sixth grader.”

In other debates, though, Cruz had seemed to be more focused on outcomes than theories. That was the case when he joined Kirsten Gillibrand, a Democratic senator from New York, in her effort to address sexual assault in the military by taking the decision-making process for pursuing such cases out of the regular chain of command. Cruz told me that he had been undecided at the beginning of the committee hearings on the subject, and that Gillibrand’s arguments had persuaded him. “What the military is doing now, in good faith, isn’t working, and moreover, a number of our allies, including Great Britain and Israel, have made similar decisions, and the data demonstrate that the rates of reporting have increased.”

Overall, despite his image—both his supporters and his detractors would probably describe him as a true believer—Cruz had said any number of things, in public and in our interviews, that suggested he was more of a wonk than a wacko bird. “Indeed,” he had told me, “the reason I am a conservative is that I am convinced free-market policies maximize the ability of those struggling to climb the economic ladder. If I didn’t believe that were true, I wouldn’t be a conservative.” So I was wondering if Cruz’s reputation for flipping over tables reflects a lingering habit from his years as solicitor general, when he was tasked with advancing a position—the state of Texas’s position—rather than offering one of his own or working for a compromise.

“Solicitor general, by and large, is not a policy-making position,” Cruz acknowledged, and added that on several occasions he had been charged with defending things he wasn’t particularly enthusiastic about, such as Texas’ school finance system. “As a policy matter, school choice is a deep passion of mine. But it was not my role as solicitor general to advocate for school choice, nor was it the role of the Texas Supreme Court to mandate that Texas provide school choice; that is properly the role of the Legislature.

“But I’ll give you another example that would push back slightly on the suggestion that as solicitor general you’re less pragmatic,” he continued. “In both public service and private practice, I was fortunate to enjoy multiple litigation victories in cases where the outside world deemed the odds all but insurmountable. And I think the way to do so is to focus very pragmatically on how to win the case. As Sun Tzu said, every battle is won before it is fought. It is won by choosing the terrain on which the battle is fought.”

He cited Medellín v. Texas, a case he had argued before the U.S. Supreme Court that concerned a gang member named José Medellín, who had been sentenced to death in Texas for his role in the 1993 rape and murder of two teenage girls in Houston. There was no question that Medellín was guilty—he had confessed—but he was also a Mexican national, and at the time of the arrest, no one had notified him of his right under a 1963 treaty called the Vienna Convention on Consular Relations to contact consular authorities. In 2004 the International Court of Justice had ruled that 51 Mexican nationals in such situations, including Medellín, had the right to a review of their convictions. The next year President Bush issued a memorandum referencing the World Court’s decision and ordered the states to comply. Texas balked.

“The narrative of the other side was straightforward,” Cruz said. “It was ‘Texas cannot flout the treaty obligations of the United States of America. Texas cannot thumb its nose at the federal government, and at the president of the United States, and at every nation on the face of the earth. And besides, you know how those Texans are about capital punishment anyway.’ If that’s what the case is about, we lose. If the question is ‘Can Texas defy the treaty obligations of the United States?’ we lose. And that’s why just about every observer said there’s no way Texas can win.”

Instead Abbott and Cruz decided to approach it as a separation of powers case. By ordering Texas to comply with the World Court’s ruling, Cruz argued, Bush was ignoring Congress’s authority to implement treaties in accordance with existing American law. He was also snubbing the Supreme Court, which hadn’t yet weighed in on the subject.

“At the end of the day, the court adopted our narrative,” Cruz concluded. “And we didn’t just win, we won six to three, which astonished observers. I’m convinced that framing it as a separation of powers case instead of a federalism case was critical to winning it.”

I recalled that in his 2010 book, Fed Up!, Perry mentions the case—which was, as he put it, argued by Texas’s “able” solicitor general—but frames it as one centered on federalism. Perry also includes some sharp words about those on the Supreme Court who dissented in the ruling: “Amazingly, however, three justices did not agree, perhaps believing instead that international law should trump the laws of Texas.”

“Yes, I know,” said Cruz, and left it at that, politely.