White House Counsel Don McGahn, arriving in the lobby of Trump Tower in New York last month, has found himself at the center of the controversy surrounding Michael Flynn’s resignation from the national security adviser post. (Albin Lohr-Jones/Bloomberg)

Less than a month into his presidency, Donald Trump has faced no shortage of controversies. Donald McGahn — the fiery lawyer who has represented the president since before his election — has been at the center of virtually every one.

When the acting attorney general wanted to warn the White House that its national security adviser was potentially susceptible to Russian blackmail, she passed the message first to McGahn.

When the director of the Office of Government Ethics wrote a letter recommending an investigation of senior adviser Kellyanne Conway for her public endorsement of Ivanka Trump’s clothing line, he made sure McGahn had a copy.

McGahn played a key role in helping Trump select Neil Gorsuch as his Supreme Court nominee and even told those not chosen that they had been passed over.

And while it is unclear the extent to which he scrutinized in advance Trump’s executive order temporarily barring refugees and citizens from seven Muslim-majority countries from entering the United States, after it was issued he tried to dispel confusion over the ban.

Justice Department lawyers have asserted that his clarifying memo should be treated as if it came from the president himself.

“The guidance from the White House counsel is the definitive interpretation of the order,” a Justice Department lawyer said at a recent court hearing. “The White House counsel speaks for the president in this context.”

McGahn, 48, is a veteran campaign finance lawyer and former commissioner on the Federal Election Commission. Before taking over the role of White House counsel, he worked at the Jones Day law firm and as general counsel to the Trump campaign. He is a consummate Washington insider, but like the man for whom he works, he has an independent streak, those who know him say.

He plays the guitar and once sported shoulder-length hair.

“Don is not a buttoned-down guy,” said Bradley A. Smith, a law professor at Capital University and longtime professional friend of McGahn.

On the Federal Election Commission, where he served from 2008 to 2013, McGahn repeatedly clashed with Democratic commissioners as he worked to loosen regulations on campaign spending and place limits on the commission’s ability to launch investigations of violations of campaign finance law. Democratic Commissioner Ellen L. Weintraub said McGahn “came into this agency with the agenda of blowing it up from the inside” and resisted pursuing virtually all complaints of election-related wrongdoing.

“One thing that does trouble me a little bit in the role that he’s in now is he was never someone who was open to new ideas or people challenging his views,” Weintraub said.

McGahn in 2011 helped protect Trump from a possible investigation. Then mulling a run for president, Trump was accused of violating Federal Election Commission regulations by channeling money through the Trump Organization to the website ShouldTrump­Run.com. Commission staff members recommended that Trump be investigated, but the case was dismissed after McGahn and two other Republican commissioners voted against the recommendation. Trump ultimately did not run for president in 2012.

As White House counsel, McGahn is supposed to provide the president with legal guidance on the thorniest issues of the day, and to manage disputes between power players inside the administration and the various executive agencies. Kathryn Ruemmler, who served as White House counsel under Obama, said it is critical that the counsel maintains a position of authority and thinks in the long term.

“The White House counsel has to be empowered to be the process hawk, hopefully with the full support of the chief of staff,” Ruemmler said. “There are a lot of short-term, win-the-day voices in the room. The White House counsel should not be focused on winning the day. The White House counsel should be the voice in the room that’s thinking about the long-term institutional interests of the presidency.”

If his predecessors provide any indication, McGahn will not be able to dodge high-profile controversies. Obama White House counsel Gregory B. Craig, for example, was responsible for drafting the executive actions that banned torture, and he was at the center of the failed attempt to close the Guantanamo Bay prison. Alberto R. Gonzales, the White House counsel and later attorney general under George W. Bush, was involved in crafting legal guidance that critics say paved the way for the use of inappropriately harsh interrogation techniques on detainees in the war against terrorism.

Then-Acting Attorney General Sally Yates first told McGahn in late January that Michael Flynn, then Trump’s national security adviser, was potentially susceptible to Russian blackmail because he had misled senior administration officials about the nature of his communications with the Russian ambassador to the United States. Flynn had said publicly that he did not discuss U.S. sanctions imposed on Russia when he spoke with the ambassador in late December, when in fact he had.

White House press secretary Sean Spicer said Tuesday that McGahn briefed the president and a small group of senior advisers soon after receiving the message and conducted his own review to determine if Flynn had acted illegally. Spicer said McGahn determined Flynn had not, although Flynn had nonetheless lost the president’s trust. Late Monday, Flynn resigned.

Smith said he had talked with McGahn a few times since the election and he seemed “upbeat and busy.” He said he was not sure who played what role in drafting the travel ban, and he and McGahn had not discussed the response to revelations about Flynn.

A White House spokesman did not immediately respond to a request to interview McGahn for this story.

It remains unclear what role McGahn played in drafting the hotly contested travel ban.

Trump has moved at a rapid pace to make good on some of his controversial campaign promises, including the ban. That executive order already has run into several successful court challenges, which have frozen it for now, and Trump has said he is considering rewriting it.

After the ban was issued, McGahn issued a memo asserting that the ban did not apply to legal permanent residents of the United States — although courts have said if that is to have true legal force, Trump must make it a part of his executive order.

“The White House counsel is not the President, and he is not known to be in the chain of command for any of the Executive Departments,” three judges with the U.S. Court of Appeals for the 9th Circuit wrote in an opinion upholding the suspension of Trump’s travel ban.

Jack Goldsmith, a Harvard Law School professor and co-founder of the Lawfare blog, said that part of McGahn’s job is “ensuring that the president avoids legal controversy or related political controversy.”

“The White House counsel’s responsibilities go far beyond technical legal compliance,” said Goldsmith, a former assistant attorney general heading the Office of Legal Counsel. “He is supposed to ensure compliance with ethics rules. And he is supposed to anticipate political problems related to legal issues that might adversely affect the president and take steps to protect the president. That McGahn clearly did not do.”