As the friends commiserated and discussed what to do next, an acquaintance named Kate Moulene stopped by. In a phone conversation later that afternoon, she suggested that Ms. Reiner contact her sister’s former husband, a leading constitutional lawyer. His name was Ted Olson, she said, and “knowing him as I do, I bet he’d be on your side of this.”

“Ted Olson?” Ms. Reiner recalls exclaiming. “Why on earth would I want to talk to him?”

Mr. Olson’s reputation, after all, went far beyond Bush v. Gore. As head of the Office of Legal Counsel at the Justice Department in the Reagan administration, Mr. Olson had been an architect of the president’s drive to ease government regulation and end race-based school busing and affirmative action set-asides in federal contracting. He later provided assistance to those seeking to impeach President Bill Clinton.

As Mr. Bush’s solicitor general, in charge of representing the government before the Supreme Court, Mr. Olson became identified with the administration’s broad interpretation of its wartime power in the wake of the Sept. 11 attacks, in which his wife, Barbara, a conservative commentator, was killed. (Mr. Olson nonetheless privately counseled that terrorism suspects be given certain basic legal rights, administration officials said, correctly predicting that failure to do so would lead to Supreme Court setbacks.)

Still, Mr. Reiner was intrigued. The tactician in him saw the wisdom of hiring a lawyer who had won 44 of the 55 Supreme Court cases he argued; the director grasped the dramatic impact of such a casting decision. He dispatched Mr. Griffin to consult with experts about the feasibility of a federal court challenge to Proposition 8 and to gauge Mr. Olson’s interest.

“I thought, if someone as conservative as Ted Olson were to get involved in this issue, it would go a long, long way in terms of presenting this in the right kind of light,” Mr. Reiner said.

In fact, Mr. Olson’s history was more complex than Mr. Reiner imagined.

Mr. Olson had become active in the Republican Party as a college and law student in California in the 1960s, long before the rise of the religious right and its focus on social issues. He gravitated toward a particularly Western brand of conservatism that valued small government and maximum individual liberty, becoming one of a few law students at the University of California, Berkeley to support Barry Goldwater’s 1964 presidential bid.

At the time, the South was riven by racial strife, and during a college debate trip to Texas, Mr. Olson got his first close-up view of blatant discrimination. Lady Booth Olson, a lawyer whom Mr. Olson married in 2006, said he still tears up when telling how a black teammate was turned away from a restaurant in Amarillo. Mr. Olson “tore into the owner,” insisting the team would not eat unless everyone was served, recalled the team’s coach, Paul Winters. “If he sees something that is wrong in his mind, he goes after it,” Mr. Winters said.