FBI Director James Comey confirmed Wednesday that the FBI is conducting an internal investigation into whether agents leaked information to former Mayor Rudy Giuliani and others about the probe into Hillary Clinton during the presidential campaign.

“Now either they’re lying or there is a serious problem within the bureau,” Sen. Patrick Leahy (D-Vt.) said during a Senate Judiciary Committee hearing.

“Did anybody in the FBI during this 2016 campaign have contact with Rudy Giuliani about the Clinton investigation?”

“I don’t know yet, but if I find out that people were leaking information about our investigations whether to reporters or private parties, there will be severe consequences,” Comey replied.

He went on to refer to it as “a matter FBI is looking into.”

On Oct. 26, two days before Comey informed Congress that the FBI was looking into new allegations about Clinton’s private email server, Giuliani was on Fox News predicting that the Trump campaign had “a surprise or two that you’re going to hear about in the next few days.”

“We’ve got a couple of things up our sleeve that should turn this thing around,” he added.

But Giuliani later said he had no inside information that Comey was going to announce the discovery of emails on Huma Abedin’s laptop that could be related to the probe of Clinton — an event that Clinton claims may have cost her the election.