The Facebook Inc. website is displayed on an Apple Inc. Macbook Air laptop in an arranged photograph taken in New York. Photographer: Johannes Berg/Bloomberg

A Lithuanian man admitted he helped trick Facebook Inc. and Alphabet Inc.’s Google into sending more than $100 million through a phishing scheme.

Evaldas Rimasauskas, 50, pleaded guilty to one count of wire fraud before U.S. District Judge George Daniels on Wednesday under an agreement with prosecutors and will forfeit $49.7 million. Rimasauskas was extradited to New York in August 2017. He faces as much as 30 years in prison when he is sentenced July 24.

Prosecutors alleged that Rimasauskas, along with some unidentified co-conspirators, helped orchestrate a scheme where fake emails were sent to employees and agents of the two tech giants. The thieves pretended to represent Taiwanese hardware maker Quanta Computer. They told Facebook and Google workers that the companies owed Quanta money, and then directed payments be sent to bank accounts controlled by the scammers.

Dressed in tan prison clothing and speaking in Russian through a translator, Rimasauskas told the judge that he took part in the fraud scheme from October 2013 to October 2015, posing as a Quanta employee, creating fake bank accounts in Latvia and Cyprus to receive the scammed proceeds, and signing fake contracts and documents that were submitted to banks to support the wire transfers.

“I fully understood that my actions were fraud,” Rimasauskas said.

Daniels asked Rimasauskas why the victims wired the money and whether they were promised anything in return.

“I’m not sure 100 percent because I was asked to open bank accounts,” Rimasauskas said. “After that I did not do anything with these accounts.”

Assistant U.S. Attorney Eun Young Choi told the judge that prosecutors don’t allege that Rimasauskas was the one who directly induced the companies to send the money.

“He created the infrastructure to further the fraudulent transfers,” Choi said.

Copyright 2019 Bloomberg. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.