Republicans officials fell victim to a cybersecurity breach during the 2018 midterm elections, according to reports on Tuesday that the accounts of four top aides were compromised.

The National Republican Congressional Committee (NRCC) was surveilled for several months.

The intrusion was first detected back in April.

The NRCC launched an internal investigation and the FBI was alerted to the attack. Politico first reported on the attack based on information provided by officials involved, who asked to remain anonymous.

Three senior party officials also told Politico that the hack exposed thousands of sensitive emails to an outside intruder.

But despite how massive the breach apparently was, many within the party were unaware it had occurred.

House Speaker Paul Ryan (R-Wis.) and Majority Leader Kevin McCarthy (R-Calif.) were among the senior officials who were unaware of the issue until recently.

The NRCC officials said the committee decided to withhold the information because it was intent on conducting its own investigation.

The officials feared that revealing the hack would compromise efforts to find the culprit. The hack internally caused anxiety within the committee, given that the midterm elections were occurring.

“We don’t want to get into details about what was taken because it’s an ongoing investigation,” a senior party official told Politico.

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

“Let’s say they had access to four active accounts. I think you can draw from that.”

The NRCC brought in the law firm Covington and Burling, as well as Mercury Public Affairs, to oversee the response to the hack.

The NRCC paid the two firms hundreds of thousands of dollars to help in the response. Chris Winkelman, chief legal counsel for the committee, was also at the forefront of the response.

Related: Roger Stone Denies Early Access to Hacked Clinton Campaign Emails

The NRCC officials said none of the hacked information appears to have been leaked to the public. There have also been no attempts to threaten the committee or its leadership with the information.

During the already heated 2016 presidential election, the Democratic National Committee was the victim of a hack — resulting in the leaks of thousands of emails.

But thousands of emails from top officials are still out there. The officials also believe a foreign agent was involved, due to the nature of the attack.

The hack underscores the growing importance of cybersecurity in politics, business and pretty much any sector that keeps sensitive information on computers.

During the already heated 2016 presidential election, the Democratic National Committee was the victim of a hack — resulting in the leaks of thousands of emails.