Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

NEW YORK — The outgoing CIA director charged on Sunday that Donald Trump lacks a full understanding of the threat Moscow poses to the United States, delivering a public lecture to the president-elect that further highlighted the bitter state of Trump's relations with American intelligence agencies.

John Brennan's pointed message on national television came just five days before Trump becomes the nation's 45th president amid lingering questions about Russia's role in the 2016 election even as the focus shifts to the challenges of governing.

"Now that he's going to have an opportunity to do something for our national security as opposed to talking and tweeting, he's going to have tremendous responsibility to make sure that U.S. and national security interests are protected," Brennan said on "Fox News Sunday," warning that the president-elect's impulsivity could be dangerous.

CIA Director John Brennan testifies before the Senate Intelligence Committee in Washington, D.C., in June. Yuri Gripas / Reuters

"Spontaneity is not something that protects national security interests," Brennan declared.

Trump, who has unleashed a series of aggressive tweets against the U.S. intelligence community and his political rivals in recent weeks, responded by implying that Brennan had done a bad job as CIA director — and suggesting that he might even have been responsible for information leaking from the intelligence agencies.

"Couldn't do much worse - just look at Syria (red line), Crimea, Ukraine and the build-up of Russian nukes," Trump said on Twitter. "Not good! Was this the leaker of Fake News?"

.@FoxNews "Outgoing CIA Chief, John Brennan, blasts Pres-Elect Trump on Russia threat. Does not fully understand." Oh really, couldn't do... — Donald J. Trump (@realDonaldTrump) January 16, 2017

much worse - just look at Syria (red line), Crimea, Ukraine and the build-up of Russian nukes. Not good! Was this the leaker of Fake News? — Donald J. Trump (@realDonaldTrump) January 16, 2017

The president-elect remained behind closed doors in his Manhattan high-rise Sunday as his team worked to answer questions about his plans at home and abroad once he's sworn into office on Friday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Among Trump's immediate challenges: the United States' complicated relationship with Russia, crafting an affordable health care alternative that doesn't strip coverage from millions of Americans, and growing questions about the legitimacy of his presidency.

Related: Trump Open to Lifting Russia Sanctions, Not Committed to ‘One China’ Policy: Report

Civil rights legend Rep. John Lewis, D-Ga., is among several Democrats in Congress who vowed to skip Trump's inauguration, charging that Russian interference in the 2016 election delegitimizes his presidency.

"There will be many more members who join us in this decision," Rep. Jared Huffman, D-Calif., wrote Saturday on his Facebook page.

Trump's lieutenants pushed back hard Sunday in a round of television interviews.

"I think it's incredibly disappointing and I think it's irresponsible for people like himself to question the legitimacy of the next United States president," incoming White House chief of staff Reince Priebus said of Lewis on ABC's "This Week," insisting that Republicans did not question the legitimacy of President Barack Obama's victory eight years ago.

Vice President-elect Mike Pence said on "Fox News Sunday" that he hopes Lewis will change his mind and attend.

Priebus later acknowledged that conservatives — led by Trump himself — spent years questioning Obama's eligibility to serve as president, suggesting he was not born in the United States.

Trump has done little to encourage unity in recent days, instead inflaming tensions with his critics through a series of tweets. The incoming president tweeted Saturday that Lewis should pay more attention to his "crime ridden" Atlanta-area district, adding that the civil rights leader was "all talk."

Lewis suffered a fractured skull when he led a march in Selma, Alabama, more than a half century ago and has devoted his life to civil rights.

The current White House chief of staff, Denis McDonough, said "Lewis has literally fought, bled and gone to jail" during what he called his "remarkable life." He encouraged the incoming president to move past Lewis' criticism.

"That would be the kind of thing that would not only send a message to the American people that we're prepared to work together, but would also send a message to the Russians that we are united," McDonough said on CNN's "State of the Union."

Questions about Trump's relationship with Russia have dominated the days leading up to his inauguration.

Retired Gen. Michael Flynn, who is set to become Trump's national security adviser, has been in frequent contact with Russia's ambassador to the U.S. in recent weeks, including on the day the Obama administration hit Moscow with sanctions in retaliation for the alleged election hacking, a senior U.S. official said.

After initially denying the contact took place, Trump's team publicly acknowledged the conversations on Sunday.

"The conversations that took place at that time were not in any way related to the new U.S. sanctions against Russia or the expulsion of diplomats," said Vice President-elect Mike Pence, also in an appearance on "Fox News Sunday."

Repeated contacts just as Obama imposed sanctions would raise questions about whether Trump's team discussed — or even helped shape — Russia's response. Russian President Vladimir Putin unexpectedly did not retaliate against the U.S. for the sanctions or the expulsion of 35 Russian diplomats, a decision Trump quickly praised.

Trump has repeatedly called for a better relationship between the U.S. and Putin's government. He suggested in an interview with the Wall Street Journal on Friday that he'd consider easing the latest sanctions on Russia.

"I think he has to be mindful that he does not have a full appreciation and understanding of what the implications are of going down that road," Brennan said.

The CIA chief roundly denounced Trump's approach to Russia and other national security threats, suggesting the president-elect has much to understand before he can make informed decisions on such matters.

"The world is watching now what Trump says and listening very carefully. If he doesn't have confidence in the intelligence community, what signal does that send to our partners and allies as well as our adversaries?" Brennan said.

"It's more than just about Mr. Trump," he said.