During a press briefing on Friday, White House Press Secretary Sean Spicer and reporters sparred over former National Security Adviser Michael Flynn's role as a foreign agent.

Flynn, who was fired from his prominent White House job last month, had registered with the Justice Department as a foreign agent for $530,000 worth of lobbying work before Election Day that may have aided the Turkish government.

A series of reporters questioned Spicer about an Associated Press report that the Trump transition team was informed prior to Inauguration Day that Flynn needed to register with the Justice Department.

Fox News' John Roberts asked Spicer why Flynn's dealings with Turkey didn't raise a "red flag" for the transition team.

Spicer said the team followed the law and told Flynn to consult lawyers - which is what he did.

“It’s not a question raising red flags,” Spicer said. “It’s the question of whether they gave them advice they were supposed to, it’s not up to them what you need to do or not do.”

The New York Times' Glenn Thrush suggested that this raises bigger questions about the transition team's judgment.

"Forget about forms and the legalisms here, what does this say about the transition team's judgment about still appointing him as national security adviser when you had knowledge of this information?" Thrush asked.

Spicer insisted they did everything by the book.

“You’re asking me to forget about the legalisms,” Spicer said. “That’s what we ask people to do is follow the law. You can’t forget about the legalisms."

Watch the testy exchange above.

Shot at Trump? Clinton Says Rising Nationalism 'Taking Us to Edge of Destruction'

Hannity: Time for Trump to 'Purge' Obama Holdovers From Executive Branch

Huckabee Slams Anti-Trump Press: 'The Zenith of What People Are Disgusted By'