SAN FRANCISCO — Lawyers mounted their arguments Wednesday to intervene in a federal challenge to California’s gay marriage ban, but Chief Judge Vaughn Walker clearly knew how he would rule before any of them uttered a word.

Walker, whose facial expressions alternated between somber and smiles throughout the hearing, read from a prepared text after the lawyers had their turn. Without smiling he denied an attempt by gay rights groups to direct the plaintiffs’ case alongside legal heavyweights Theodore Olson of Gibson, Dunn & Crutcher and David Boies of Boies, Schiller & Flexner.