The United States monitored a Russian cyberattack on France's election last week and notified French officials, the head of the National Security Agency said Tuesday.

Adm. Mike Rogers said the agency witnessed Moscow "penetrate" public infrastructure before a major dump of winning candidate Emmanuel Macron's hacked emails went online before citizens went to the polls.

The NSA is working with Germany and Great Britain on similar efforts to monitor and protect their upcoming elections, Rogers said.

"We had become aware of Russian activity. We had talked to our French counterparts prior to the public announcements of the events that were publicly attributed [to Russia] this past weekend and gave them a heads up, 'Look, we're watching the Russians, we're seeing them penetrate some of your infrastructure,' " Rogers told the Senate Armed Services Committee.