The Romanian hacker who first revealed that Hillary Clinton used a private email address while she was secretary of state was sentenced to more than four years in federal prison Thursday by a U.S. district judge in Alexandria, Va.

Marcel Lehel Lazar, 44, known online as “Guccifer,” was extradited in 2014 to the United States and pleaded guilty in May to one count each of aggravated identity theft and unauthorized access to a protected computer.

Lazar admitted to victimizing about 100 Americans from his home overseas over 14 months. They included celebrities, business executives and political figures such as Sidney Blumenthal, an adviser with whom Clinton corresponded using her personal email account; confidantes of former president George W. Bush; and former secretary of state Colin L. Powell.

U.S. District Judge James C. Cacheris imposed a 52-month sentence, saying a tough penalty was needed to deter future hacking. He cited reports of escalating cyber­attacks against Americans in recent years, including this week’s FBI warnings of intrusions into state election systems.

“This epidemic must stop,” Cacheris said.

The State Department released 52,000 pages of Hillary Clinton’s emails as part of a court-ordered process. Here's what else we learned from the publicly released emails. (Monica Akhtar/The Washington Post)

Hacking passwords and employing social-engineering tactics including fraud, identity theft and harassment, Lazar stored megabytes of victims’ stolen private documents and turned them over to media outlets. He also leaked pictures of Bush’s paintings.

“The extent of the harm caused by defendant’s conduct is incalculable,” federal prosecutors wrote in seeking a maximum penalty of 41/2 years under U.S. sentencing guidelines.

A maximum punishment “would also help address any false perception that unauthorized access of a computer is ever justified or rationalized as the cost of living in a wired society — or even worse, a crime to be celebrated,” Assistant U.S. Attorney Maya D. Song wrote.

Prosecutors said a stern sentence could deter other violators. They cited the case of Guccifer 2.0, an individual or group of hackers who U.S. officials say is tied to Russian intelligence services and who claimed credit for hacking the Democratic National Committee this year.

The online publication of DNC emails by WikiLeaks led to the resignation of the committee’s chair, Rep. Debbie Wasserman Schultz (Fla.), in July. Guccifer 2.0 was branded “in homage to” Lazar, Song wrote.

Contrary to Lazar’s claims, authorities say he never obtained access to Clinton’s email account.

In court documents, Lazar’s public defense counsel asked for a sentence of three years, calling his hacking expeditions “an addiction of sorts.”

Despite his “admittedly brash on-line personality,” public defender Shannon S. Quill wrote, Lazar is actually a devoted father and husband who was frustrated by his inability to find work in the computer sector.

“We need him because life is very hard in Romania,” his wife, Gabriela Violeta Lazar, wrote in a letter to the court.

He was also motivated, Quill wrote, “to expose what he saw as hypocrisy, especially in those connected to the defense and intelligence sectors.”

A high school graduate, Lazar had no formal training or computer expertise. He told the New York Times that he obtained access to the email and social-media accounts of high-profile people by reading their Wikipedia pages and guessing passwords based on their personal information.

Once he had access to one person’s account, he sometimes impersonated them to gain more passwords and personal information.

Although he told the FBI that he was interested in politics and “a better world for our children,” he targeted a seemingly random mix of politicians and celebrities. Along with Bush and Powell, he exposed the personal information of magazine editor Tina Brown, author Candace Bushnell and actor Jeffrey Tambor.

In his 2014 interview, Lazar told FBI agents that he trawled more or less randomly through the online accounts of “important people,” looking for weak spots. He succeeded only about 8 to 10 percent of the time, he estimated.

Prosecutors argued that although Lazar confessed, he showed no remorse and probably will return to hacking. He was on probation for a hacking offense in Romania when he began targeting American celebrities in 2012 and has been sentenced to seven years in prison there.

If he could go back in time and talk to his 2012 self, prosecutors say that he told one FBI agent, “I’d say, ‘All right, you have done a good job.’ ”

Cacheris said Romania’s Justice Ministry requested that Lazar be immediately released to his home country to serve his time there and indicated that he would be conditionally released in 2018 and returned to the United States to serve his prison term here.