White House counsel Don McGahn reportedly examined federal law, days after President Trump's inauguration, about lying to federal investigators and violations of the Logan Act, which forbids private citizens from negotiating with foreign governments.

Records from the White House that revealed McGahn's research effort were obtained by special counsel Robert Mueller during the fall and suggest that McGahn was looking into whether White House national security adviser Michael Flynn had violated one or both of the laws.

The records indicate McGahn notified Trump about the potential violations, Foreign Policy reported Wednesday.

McGahn’s research was performed after he was informed that Flynn had urged then-Russian ambassador Sergey Kislyak in December 2016 against retaliation for U.S. economic sanctions implemented by the Obama administration.

Two administration officials told Foreign Policy that McGahn was concerned that Flynn and whoever might have approved of such contact would be in jeopardy of violating the Logan Act.

Trump fired Flynn in February only after the Washington Post reported Flynn misled Vice President Mike Pence and other senior administration officials about his communications with Kislyak, which was 18 days after then-Acting Attorney General Sally Yates notified McGahn she was worried about Flynn’s Russian contacts.

Another source who spoke with Foreign Policy confirmed that the White House counsel’s office was involved in the research, but claimed that much of it was not conducted by McGahn, but rather John Eisenberg, the deputy counsel to the president and legal adviser to the National Security Council, along with James Burnham, another White House counsel staff member.

Flynn pleaded guilty in federal court earlier this month for lying to the FBI in January about his contacts with Kislyak. Flynn was charged on one count of “willfully and knowingly” making “false, fictitious and fraudulent statements” to the FBI about communications exchanged with Kislyak shortly after Trump took office.

Flynn said he is cooperating with Mueller, who is investigating Russian meddling in the 2016 election.