Attorney General Jeff Sessions, left, shakes hands with President Trump after Trump spoke to a joint session of Congress on Tuesday. (Mandel Ngan/AFP/Getty Images)

President John F. Kennedy picked his younger brother to be attorney general. President Trump might have picked the next closest thing.

Jeff Sessions was the first senator to endorse Trump at a time when few Republican lawmakers supported the candidate. His early and fierce loyalty — and his ability to translate Trump’s nationalist instincts into policy — helped him forge a bond with the president, and he now enjoys access whenever he wants it, a privilege that few get, an official said.

Two of Sessions’s former Senate advisers — Stephen Miller and Rick Dearborn — hold key White House roles, and one official said Sessions still talks to them regularly. The attorney general also is friendly with Stephen K. Bannon, Trump’s chief strategist and a powerful player in the administration who promoted Sessions for years on the Breitbart website.

On Thursday, not long before Sessions recused himself from any investigations related to the Trump campaign, the president proclaimed that he had “total” confidence in his attorney general. Later, Trump issued a statement calling Sessions “an honest man” who “did not say anything wrong. He could have stated his response more accurately, but it was clearly not intentional.”

Trump also derided the “whole narrative” as “a way of face saving for Democrats losing an election that everyone thought they were supposed to win,” and he pointed — as he has in the past — to leaks of classified information as the “real story.”

(Zoeann Murphy/The Washington Post)

“It is a total witch hunt!” Trump said.

The remarks — which came as pressure mounted for Sessions to step aside from any investigations of Trump associates and Russia, or to resign altogether — demonstrate the high standing Sessions has in Trump’s Cabinet, and the critical role he will play in carrying out the president’s vision.

Already, the administration has moved swiftly to implement policies that correspond with the worldview shared by Trump and Sessions. In his inaugural address, Trump spoke of rising crime and vowed to end the “American carnage.” His attorney general, in his first speech, laid out how he plans to do that: a task force, a crackdown on drugs and an increased respect for police, who he suggested might see less aggressive scrutiny than they did under his predecessor. “I do not believe that this pop in crime — this increase in crime — is necessarily an aberration, a one-time blip,” Sessions told the National Association of Attorneys General.

On immigration, an issue that has consumed much of Sessions’s career, the ideological influence in Trump’s policies is vivid and clear, and his Justice Department will be tasked with implementing — and defending — the president’s plans.

In the Senate, Sessions was a crusader for a hard-line stance on immigration, arguing that even legal immigration to the United States should be moderated. Trump has essentially implemented Sessions’s ideas by executive action — calling for the hiring of more Customs and Border Protection agents, expanding the pool of those who are prioritized for removal, and temporarily barring refugees and citizens of seven Muslim-majority countries from entering the United States.

That last order has since been frozen by the courts, and Sessions’s Justice Department, which has forcefully defended it, has been involved in crafting a new one.

Sessions also has taken steps to undo the previous Justice Department’s policy toward transgender children, changed its position on a Texas voting rights law the department had been fighting for years and reversed the previous administration’s policy on the use of private prisons. His views on those topics match those of the president, who has cast himself a champion of private industry and alleged, without evidence, that massive voter fraud affected the election. During an internal White House debate over the transgender policy, Trump sided with Sessions over Education Secretary Betsy DeVos, according to the New York Times.

The attorney general holds a unique role in any presidential Cabinet — requiring the person in the job to implement the president’s policy goals on one hand, while faithfully enforcing laws on the other. Sessions is not the first attorney general to enjoy a close relationship with the president. Attorney General Eric H. Holder Jr., whose worldview was similar to President Barack Obama’s, enjoyed status as the former president’s favorite Cabinet member.

Like Sessions, Holder came to know Obama before he ran for office and then joined him as a close adviser on the campaign trail. On issues such as same-sex marriage and the reform of a criminal justice system, which they both saw as deeply unfair to young black men, the two worked hand in hand as Holder executed policies that they both supported.

Sessions and Trump met in 2005, when Sessions invited him to Washington to testify at a Senate subcommittee hearing about his criticism of a U.N. project. Sessions was taken with the billionaire developer and later said it was the best congressional testimony he had ever heard.

Two years ago, in June 2015, Trump and Sessions held a conference call on immigration policy. After that, Trump began trying to persuade Sessions to endorse him for president, and by January 2016 had, in essence, lent his top aide, Miller, to the Trump campaign.

In February of last year at a rally in Alabama, Trump told the crowd that Sessions supported him, and Sessions donned a red “Make America Great Again” hat as he praised Trump, months after Sessions teased the possibility at a summer rally in Mobile. Observers on the campaign trail noted how different the two seemed. Trump is from the North, Sessions from the South. Trump is brash, while Sessions is soft-spoken. Sessions has been in politics for nearly 20 years; Trump is a businessman who had never before held elected office.

But they bonded over their views on issues like immigration and law and order, with Trump’s view of those issues influenced by his father, Fred, and his early years in business in New York, and how he saw global competition threaten the U.S. economy. Miller, a former Sessions aide, is the author of many of Trump’s executive orders, and Dearborn, Sessions’s longtime chief of staff, works to turn Trump’s goals into law.

In Trump’s orbit, of course, support can evaporate in an instant, and it is hard to assess who is truly in power — aside from Trump himself. White House counselor Kellyanne Conway said national security adviser Michael Flynn had the “full confidence” of the president, and on the same day, Flynn resigned amid revelations that he had misled Vice President Pence about his conversations with the Russian ambassador.

Yet Sessions so far has largely weathered the storm. He confirmed Thursday that he met twice with Russian ambassador Sergey Kislyak, a fact he had omitted at his Senate confirmation hearing to become attorney general.

At that hearing, Sessions was asked by Sen. Al Franken (D-Minn.) what he would do if he learned of any evidence that anyone affiliated with the Trump campaign communicated with the Russian government in the course of the 2016 campaign, and said, “I have been called a surrogate at a time or two in that campaign and I did not have communications with the Russians.”

Sessions said at a Justice Department news conference Thursday that he would provide the Judiciary Committee a written explanation for his testimony in the next day or two, while still insisting it was “honest and correct as I understood it at the time.” His explanation is that he was flustered by Franken’s question — which referenced a breaking news story about contacts between Trump surrogates and Russians.

“It struck me very hard, and that’s what I focused my answer on,” he said. “In retrospect, I should have slowed down and said I did meet one Russian official a couple times. That would be the ambassador.”

Sessions said he would now recuse himself from any investigations having to do with the Trump campaign and insisted he had been talking with Justice Department ethics officials about doing so even before news broke of his meetings with Kislyak.

Not long before, Trump himself had said he did not believe Sessions needed to do so. White House press secretary Sean Spicer had also said: “There’s nothing to recuse himself” and said those criticizing Sessions were “choosing to play partisan politics.”

Sessions said he told the White House counsel what he planned to do Thursday afternoon, but they perhaps didn’t know or understand the rules as he did.

“I should not be involved investigating a campaign I had a role in,” Sessions said.