Farmer Bros. Co. said Wednesday that it would restate its quarterly and annual financial statements for three full fiscal years in order to correct errors in accounting for the company's postretirement benefit obligations.

The Torrance coffee roaster and beverage service distributor said in regulatory filings that the restatements would cover the fiscal years ended June 30, 2012, 2011 and 2010, as well as the first three quarters of the 2013 fiscal year. The errors led the company to overstate its net loss for 2012 and 2011 and understate it for 2010.

Farmer Bros.’ accounting firm, Ernst & Young, found the errors during an audit, and the company said that it has taken steps improve internal controls over its financial reporting in the future.

Shares closed down 29 cents, or 2 percent, to $14.38 on the Nasdaq. They rose 1 percent in after-hours trading.