Washington (CNN) Sen. Mark Warner, the top Democrat on the Senate Intelligence Committee, warned on Friday it could be illegal for lawmakers to uncover the identity of an intelligence source in an attempt to undercut the federal investigation into Russia's interference in the 2016 presidential election.

"It would be at best irresponsible, and at worst potentially illegal, for members of Congress to use their positions to learn the identity of an FBI source for the purpose of undermining the ongoing investigation into Russian interference in our election," the Virginia Democrat said in a statement.

The warning comes in the midst of an extended back and forth between Rep. Devin Nunes, the California Republican who is the chairman of the House Intelligence Committee, and the Justice Department as Nunes presses for information related to the Russia investigation.

Earlier this month, Nunes threatened to hold Attorney General Jeff Sessions in contempt of Congress for withholding classified information on the investigation. CNN reported at the time that the Justice Department warned Nunes that handing over information related to a "specific individual" could put national security at risk. House Speaker Paul Ryan, a Wisconsin Republican, later sided with Nunes in the dispute.

Warner emphasized the importance of safeguarding intelligence sources in his Friday evening statement, saying exposing a source could endanger American lives.

Read More