WASHINGTON — Judge Neil M. Gorsuch’s road to a Supreme Court nomination included stops at a fancy law firm conference room, the dreary basement of a government office building, President Trump’s gilded penthouse in Trump Tower, the White House’s Lincoln Bedroom and a ride on a military jet.

Although his name did not even appear on Mr. Trump’s first list of 11 potential nominees, Judge Gorsuch was the last person standing in a selection process that in some ways began last year, when as a candidate Mr. Trump took the unusual step of releasing the names of those he would consider for the court. The process, described in interviews with White House and transition officials and others involved, ended last Tuesday night, with the president’s announcement that he had found a judge who was “as good as it gets.”

Mr. Trump’s lists — the second one added 10 names, including that of Judge Gorsuch — leaned on recommendations from two conservative groups, the Federalist Society and the Heritage Foundation. Both lists were compiled by Donald F. McGahn, Mr. Trump’s longtime election lawyer and now the White House counsel.

Judge Gorsuch was well known in conservative circles, but his stellar academic credentials — which include degrees from Columbia, Harvard and Oxford — may have worked against him at first, an official said, as the initial list had an anti-establishment theme. His body of judicial work and other writing was substantial and warranted careful review, which took time. And there was a concern about subjecting him to early “scrutiny and attacks” should liberal groups “unleash the hounds.”