WASHINGTON — Four years ago, Amy Coney Barrett was a little-known law professor in Indiana. Within weeks, she is likely to be the newest associate justice on the U.S. Supreme Court.

Barrett's fast-track rise, set to drive the nation's highest court to the right for a generation or longer, is the fulfillment of a decadeslong effort by conservatives to remake the federal bench that kicked into high gear after President Donald Trump was elected. For Trump, whose 2016 victory was bolstered by white evangelicals' reluctant support of his candidacy tied to his promise to fill the seat vacated by the death of Supreme Court Justice Antonin Scalia with a conservative, the latest nomination brings his first term full circle.

Even before Ruth Bader Ginsburg's death, Trump was campaigning for reelection in 2020 on his record of confirming more than 200 federal judges during his first term, fulfilling a generational aim of conservative legal activists.

"Today's nomination is the capstone of a more than four-year process where the president seized upon the issue, stayed focused, and called attention to a small bench of very talented people who he could put on the Supreme Court," said Leonard Leo, of the conservative Federalist Society.

The following account is based on information from five people familiar with the process and the president's thinking who were not authorized to speak publicly about the details.

Within weeks of Trump's victory in 2016, incoming White House counsel Don McGahn, Leo and a handful of other attorneys set about drawing up lists of potential nominees for more than 100 federal judicial vacancies. First among them was the Supreme Court vacancy created by the death of Scalia, but they also dug deeper.

Barrett, then a law professor at Notre Dame, was not well known in political circles in Indiana and almost unheard of nationally. But she found herself on the list of potential picks for the 7th U.S. Circuit Court of Appeals, in large part thanks to McGahn. A fellow Notre Dame alum, McGahn knew Barrett from conservative legal circles, like Leo's influential Federalist Society, and talked her up to the Indiana congressional delegation.

Barrett faced a bruising nomination battle for the appellate seat in 2017 that caught the attention of Trump, who was impressed with her ability to keep her cool under critical questioning by Democratic senators, including a grilling by Sen. Dianne Feinstein of California regarding her Catholic faith.

"I think in your case, professor, when you read your speeches, the conclusion one draws is that the dogma lives loudly within you," Feinstein said. "And that's of concern when you come to big issues that large numbers of people have fought for, for years in this country."

Barrett's was the only confirmation hearing for an appellate judge that McGahn sat through in person on Capitol Hill, and the only investiture he attended when she took her seat on the 7th Circuit. After Barrett was confirmed 55-43, with three Democrats voting to confirm, some White House lawyers made coffee mugs with the phrase: "The dogma lives loudly within you."

Months later, in the fall of 2017, Trump set about updating his list of potential nominees to the Supreme Court. Five names were presented to him in an Oval Office meeting with McGahn and Leo. Among the names: Barrett and Brett Kavanaugh. McGahn unveiled the list weeks later at a Federalist Society conference in Washington.

The following year, after Justice Anthony Kennedy retired, Barrett found herself on the short list, undergoing a White House vetting and a 25-minute interview with Trump.

–- with Trump telling some aides he was "saving" her for Ginsburg's seat.

Meanwhile, Barrett was making a name for herself on the 7th Circuit on conservative hot-button issues. She twice wanted decisions to be thrown out and reheard by the full appeals court that had blocked laws enacted by abortion-rights opponents. Oftentimes, the full panel comes to a different conclusion.

Last year, after a three-judge panel blocked an Indiana law that would make it harder for a minor to have an abortion without her parents being notified, Barrett voted to have the case reheard by the full court.

In a dissent in the 2019 gun-rights case of Kanter v. Barr, Barrett argued that a conviction for a nonviolent felony — in this case, mail fraud — shouldn't automatically disqualify someone from owning a gun.

Barrett wrote a unanimous three-judge panel decision in 2019 making it easier for men alleged to have committed sexual assaults on campus to challenge the proceedings against them.

This summer, when Trump announced he wanted to update the Supreme Court list once again in hopes of motivating conservative voters, Barrett was on the top. And that's where she stayed.

Barrett, in some ways, was the standard by which Trump judged other women for the list, including Florida's Barbara Lagoa and North Carolina's Allison Rushing. Their names made the list, but they weren't threatening to bump Barrett from the top, the people said.

After Ginsburg's death, Trump quickly turned his focus to Barrett and never truly looked elsewhere.

Conservative outside groups, aware of Trump's interest in Barrett from the Kennedy replacement, were already on board, offering public statements of support even before Trump had made a final determination.

In the end, Barrett was the only candidate Trump interviewed in person for Ginsburg's seat. And on Saturday evening, he formally announced his choice at a Rose Garden ceremony that included a military band and a display of American flags hanging between the columns of the White House colonnade.

"Today it is my honor to nominate one of our nation's most brilliant and gifted legal minds to the Supreme Court," Trump said of Barrett, calling her "a woman of unparalleled achievement, towering intellect, sterling credentials and unyielding loyalty to the Constitution."

Barrett, for her part, thanked the president as she introduced herself to the country. "I am truly humbled by the prospect of serving on the Supreme Court," she said.