A former accounting manager at a Cargill Inc. grain shipping facility in New York pleaded guilty to stealing more than $3.1 million from the company and causing at least $25 million in losses for it.

Diane Backis, 50, admitted Monday in federal court in the Northern District of New York to committing mail fraud and falsifying an income tax return. The scheme occurred over 10 years while she was an employee at Cargill’s Port of Albany facility, which sells, receives and stores grains.

Backis managed Cargill’s accounts, creating customer contracts, invoices and processing payments. She faces up to 20 years in prison for stealing hundreds of Cargill’s customer payments and depositing them into her personal bank accounts, said prosecutor Richard S. Hartunian.

Backis regularly sent fake invoices to customers, charging them prices less than what Cargill was paying for products, resulting in at least $25 million in losses for Minnetonka-based Cargill.

She instructed the customers to return their payments directly to her, bypassing Cargill’s corporate controls. She then created false entries into the company’s accounting software that made it look like the customers were paying the higher prices but still owed Cargill millions for already-delivered grains.

Backis also admitted to lying on her 2015 personal income tax return by declaring $61,208 in income while failing to include the more than $450,000 in taxable income she intercepted from Cargill’s customers that year alone. In addition to prison time, Backis could be fined up to $250,000 when sentenced in March.

She agreed to pay Cargill at least $3.5 million in restitution, forfeiture of her house, an investment brokerage account and her Cargill pension benefits as a part of the plea deal.

The case was investigated by the FBI and the Internal Revenue Service’s criminal investigations unit.

“Ms. Backis stole millions of dollars from her employer in a decadelong scheme to enrich herself so she could live beyond her means,” Hartunian said in a statement.

Cargill is the nation’s largest privately held company with diverse businesses ranging from grains to shipping to chocolate. Pete Stoddart, a Cargill spokesman, said the company has performed a thorough audit of its controls and trading systems and found this was an isolated case performed by one individual.