WASHINGTON — It was a stroke of luck that landed Neil M. Gorsuch in the chambers of Justice Anthony M. Kennedy on a summer day nearly a quarter-century ago.

Then 25 and fresh off a year at Oxford, Judge Gorsuch had been hired by Justice Byron R. White for the most coveted apprenticeship in American law — a Supreme Court clerkship. But because Justice White had retired, Judge Gorsuch was also assigned, by happenstance, to Justice Kennedy, the longtime center of power at the Supreme Court.

His year as a clerk, beginning in the summer of 1993, gave Judge Gorsuch a privileged look at the court’s workings and a crash course in its unrelenting caseload and internal politics. As Judge Brett M. Kavanaugh of the United States Court of Appeals for the District of Columbia Circuit, and a fellow law clerk to Justice Kennedy that year, observed, “We were in the middle of everything.”

It also produced something else: a lasting bond between an ambitious, already staunchly conservative clerk and a justice, three decades his senior, whose style and temperament appear to have rubbed off on him, even if the justice’s more moderate views did not.