“Firms are trying to recruit the best talent from the best law schools,” said Dale Carpenter, a law professor at the University of Minnesota, “and the overwhelming majority of them want to work in a community of respect and diversity.”

Image John W. Davis argued in favor of segregated public schools. Credit... Associated Press

But some conservatives say lawyers and scholars who support religious liberty and oppose a constitutional right to same-sex marriage have been bullied into silence. “The level of sheer desire to crush dissent is pretty unprecedented,” said Michael W. McConnell, a former federal appeals court judge who teaches law at Stanford.

Representing unpopular clients has a long and proud tradition in American justice, one that experts in legal ethics say is central to the adversarial system. John Adams, the future president, agreed to represent British soldiers accused of murder in the 1770 Boston Massacre. Clarence Darrow defended two union activists who dynamited the Los Angeles Times building in 1910, killing 21 workers. Leading law firms today have lined up to defend detainees at Guantánamo Bay, Cuba, some accused of ties to Al Qaeda.

The Supreme Court has said criminal defendants are entitled to a lawyer. There is no right to counsel in civil cases, but most lawyers do not lightly turn away paying clients. Some lawyers, though, have been forced out of their firms for agreeing to take on clients opposed to same-sex marriage.

Whatever the reason, there is a yawning gap between the uniformity of views among legal elites and the more mixed opinions of the American public and the members of the Supreme Court. Polls indicate that while a slim majority of Americans support same-sex marriage, many remain skeptical, and the court’s decision, expected in June, is likely to be closely divided.