As the U.S. Supreme Court heads into the homestretch of its current term, Donald Verrilli, the federal government's chief advocate, will not be there.

After five years as solicitor general, he is turning over the reins to his successor, leaving a job he describes as "reaching the mountaintop" of American law.

The day after Verrilli announced his resignation, he sat down with me in his office for what amounted to an exit interview. It's a relatively small and unillustrious office, with boring government furniture, but its view straight down Pennsylvania Avenue to the Capitol is one of the most spectacular in Washington.

During his tenure, the seventh longest in U.S. history, Verrilli has had a particularly difficult task: Representing a liberal Democratic administration before a Supreme Court dominated by a conservative, sometimes openly hostile, majority.

Looking back, he concedes that in the beginning he was perhaps too deferential to the Court.

"What I decided over time, however, was that I could be respectful of the justices... and still be more aggressive," he said. "I think I turned the dial about a quarter of the way."

And sometimes more than that. At one point during a recent argument, Verrilli found himself shaking a finger at one of the justices in frustration. Recognizing the tell-tale body language, he quickly curled the finger under.

His worst moment before the Court was on the second day of a three-day oral argument over the constitutionality of Obamacare. He had completed seven practice sessions in the run-up to the argument. It was now day two on the actual hot seat and his voice was all but shot.

He was less than a minute into his opening when his voice failed him. He coughed, paused to take a drink of water, and stopped, as an awkward silence washed over the courtroom, followed by a soft, "Excuse me."

Verrilli remembers this as an excruciating moment.

"My throat kinda seized up a bit, so I took a sip of water, and it went down the wrong way, and I just literally couldn't get words out for a little bit," he remembers. "And not surprisingly, I guess, my attention sort of wavered. I lost my focus."

By the end of nearly an hour fielding questions from the justices, Verrilli thought he had clawed his way back into the driver's seat.

"But once I got back after the argument," he said, "the roof basically was caving in around me."

He was hurled into the center of a media firestorm. CNN's Jeffrey Toobin called Verrilli's performance "a train wreck for the Obama administration." Fox News reported that the solicitor general was "under fire, stammering and coughing his way through oral arguments Tuesday." And Mother Jones called it "a spectacular flameout."

The Republican National Committee even produced a commercial, featuring edited audio of Verrilli's pauses and stutters. The ad concluded, "ObamaCare: It's a Tough Sell."

"It was rough to go through that," Verrilli says now. "But a couple of good things came out of that for me. You know, one was recognizing that at the end of the day, you can't have your sense of self-worth depend on what people outside are saying. I probably would have been better off had I learned that lesson earlier in life, but at least I got to learn it."

In the end, he was vindicated, and in more ways than most people knew. Not only did the Court uphold the health care law; it did so with Verrilli's reasoning. The decisive fifth vote came from Chief Justice John Roberts, who concluded that ultimately Obamacare was not a mandate, but a tax on those who don't get insurance.

Verrilli had insisted on including that argument in the Government's legal brief, and he fought some on the White House staff who didn't want to characterize the law as a tax. White House officials ultimately bowed to his view, in large part because they had come to respect his judgment.

Verrilli entered the administration in 2009 as an official in the Justice Department, but he was soon snapped up by the White House to serve as deputy counsel to the president. His White House connection prompted some concern among Republicans when he was named solicitor general, concern that Verrilli would be too political in the post. In fact, Verrilli says now that the effect was exactly the opposite, because the White House politicos knew and trusted him.

"They largely left me alone and let me run the office in the way I thought best, to exercise the authority of the office the way that I thought best for the United States," he recalls. "I think it's a little ironic but I do think my ability to have that independence came from the fact that I worked there before I came over here."

The job of solicitor general is not all guts and glory. Among other things, even though the government wins far more cases than it loses in the trial courts, it still loses about 2,000 cases a year. The "SG," as he is known, must look at each one of those to determine which losses will be appealed.

"If you do the math, if I work 300 days a year, I'm looking at six or seven of these every single day, and we make very careful judgments about that," he said.

These and other duties made it impossible for Verrilli to do what he did in private practice — set aside two or three whole weeks to prepare for a Supreme Court argument. But there were offsetting advantages, he observed.

For example, in 2013, he argued a case testing whether a company that isolates a gene can patent it. This was a case of enormous importance in law and medicine, since it meant that if the company won, it would remain the only company able to make and sell a test for a particular cancer gene, and other companies would rush to patent other genes.

At the heart of the case was a question of genetics and biochemistry, which, as Verrilli puts it, was "not so good for me because the last science class I took, I was a junior in high school."

What he could do, though, was call up Francis Collins, the director of the National Institutes of Health, and formerly the head of the Human Genome Project.

Collins came to all of Verrilli's practice sessions in preparation for the argument, and offered reinforcements.

"He sent a team of three genius scientists down here to this office with a whiteboard, and they sat here for three hours and they gave me a tutorial on genetics and biochemistry," Verrilli remembers. "And darned if at the end of that three hours I didn't understand the issue, and I could go in there and make an effective argument."

And darned if the Supreme Court didn't side with the federal government, and adopt the very position Verrilli put forth.

Verrilli won't be in court for the last day of the term to hear how the final momentous cases he argued will turn out. He's headed for a vacation in — where else for a Verrilli — Italy.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.