Mitch McConnell, the Republican senator from Kentucky and current Senate majority leader, has had a complex relationship with President Trump. McConnell has been “the principal enabler of the Trump agenda,” as McConnell’s longtime adviser J. Scott Jennings describes him, and much of his enduring legacy has been established during Trump’s presidency. But McConnell, a man of institutions and establishments, has also found himself in the position of supporting a president who seems hellbent on burning both to the ground, and is now trying to navigate a prolonged shutdown of Trump’s making. “I’m perplexed,” he said earlier this month, “as to how this ends.”

For the profile of McConnell in this week’s Times Magazine, Charles Homans interviewed McConnell for several hours over the course of two months, and also spoke to several dozen of his past and present staff members, Republican and Democratic senators, and Trump and Obama White House officials and cabinet members. Here are some key takeaways:

McConnell takes credit for the Trump win in the 2016 election.

When the Supreme Court justice Antonin Scalia died in February 2016, McConnell blocked President Obama from filling his seat — a decision that McConnell describes as “the most consequential thing I’ve ever done.” He takes credit for Trump’s election on the grounds that some exit polling shows that voters were heavily motivated by the Supreme Court vacancy that McConnell kept open.

McConnell’s other decisions during the campaign, intentionally or otherwise, may have helped Trump.

After the C.I.A. alerted congressional leaders of both parties — McConnell, the Senate minority leader Chuck Schumer, the House speaker Paul Ryan and the House minority leader Nancy Pelosi — to evidence of Russian meddling in the election in August 2016, several weeks passed before the leaders issued a statement. Denis McDonough, President Obama’s chief of staff at the time, blames the delay on McConnell, who he says had concerns with the wording of the statement. McDonough says that even Ryan, who broadly agreed with McConnell, nevertheless complained to him about the holdup. “At the time,” McDonough said, “the speaker evinced to me considerable frustration.”

McConnell also chose not to distance Republican Senate candidates from Trump after the Access Hollywood video, in which Trump bragged about sexually assaulting women, was published by the Washington Post. “He said, ‘Do you see any evidence that it would make any difference for candidates to distance themselves?’” Josh Holmes, a campaign strategist close to McConnell who spoke to him at the time, recalled. After speaking with Republican candidates, McConnell decided that a broader denouncement of Trump was likely to hurt them, and instead made a statement speaking only for himself.