LONDON — British Parliament on Saturday was investigating an apparent cyberattack that targeted lawmaker's email accounts.

Cybersecurity officials were alerted to the hacking attempt and reportedly notified the lawmakers on Friday. As a safeguard, they immediately blocked Parliament members from remotely accessing emails outside of the secure network in Westminster.

A spokesman for the House of Commons confirmed to NBC News they were continuing to investigate the incident, which appeared to be over.

"Well, we know that there are regular attacks by hackers attempting to get passwords," said International Trade Minister Liam Fox. "We've seen reports in the last few days of even Cabinet Ministers' passwords being for sale online. We know that our public services are attacked, so it's not at all surprising that there should be an attempt to hack into parliamentary emails."

In a statement, a Parliament spokesperson said officials discovered unauthorized attempts to access Parliament accounts and are now working with the U.K.'s National Cyber Security Centre.

"Parliament has robust measures in place to protect all of our accounts and systems, and we are taking the necessary steps to protect and secure our network," the spokesperson said Saturday. "As a precaution we have temporarily restricted remote access to the network. As a result, some Members of Parliament and staff cannot access their email accounts outside of Westminster."

Chris Rennard, a member of the Liberal Democrat party in the upper House of Lords, asked his constituents to send urgent messages to him by text.

Cyber security attack on Westminster Parliamentary e.mails may not work remotely Text urgent messages @LibDemLords @LabourLordsUK @Torypeers — Chris Rennard (@LordRennard) June 24, 2017

Henry Smith, a Conservative member of Parliament, sent a mocking tweet that blamed the North Koreans or Russians for the attack.

Sorry no parliamentary email access today - we're under cyber attack from Kim Jong Un, Putin or a kid in his mom's basement or something... — Henry Smith MP (@HenrySmithUK) June 24, 2017

The latest disruption comes more than a month after a massive malware attack struck an estimated 300,000 computers worldwide, including more than 45 public health organizations in Britain.

In that case, the malicious software known as the Wanna Decryptor, or WannaCry, locked the computer systems and files from use unless money was paid to hackers.

Alex Holmes reported from London, and Chelsea Bailey reported from New York.