The Associated Press is reporting that President Barack Obama warned Donald Trump against hiring Gen. Michael Flynn as national security adviser prior to Trump naming Flynn to the position.

Three former Obama administration officials say the warning came during the Oval Office meeting between Obama and Trump, Julie Pace of the AP reported.

Flynn, who was fired by the Obama administration, was named to Trump’s administration then fired from his position as national security adviser in February.

The White House says Flynn was fired for misleading top officials about his contacts with Russia's ambassador to the United States. Trump has both defended Flynn and blamed the Obama administration for giving him security clearance.