SANTA CRUZ, Calif. -

The largest food distribution company in the U.S. will pay almost $20 million to settle a consumer protection suit filed by prosecutors in Santa Clara and Santa Cruz counties

The district attorneys sued Sysco Corporation and its seven California operating companies for holding perishable foods such as milk and raw meat in  unrefrigerated and unregistered storage sheds.

Sysco, which is mostly involved in marketing and delivering food products, uses a fleet of refrigerated food trucks to transport most of its products. For some small orders, however, district attorneys say Sysco food trucks would deliver food orders to unrefrigerated sheds for later pick-up by other employees. The food items would them be transported in employees' personal unrefrigerated vehicles to commercial customers such as schools, hospitals and restaurants.

Sysco ceased the unsafe and illegal practice once it was brought to light by an NBC11 reporter and her undercover investigation.

The prosecution was led by the Santa Clara and Santa Cruz County District Attorney’s Offices and was filed in Santa Clara County.

"Companies can’t cut corners when it comes to food safety,” said Santa Cruz County District Attorney Bob Lee said. “We should be assured that when we go out to eat the food we are being served has been handled according to the law.”

Prosecutors alleged that Sysco's practices violated the state's health and safety code.

To settle the suit, Sysco will pay $15 million in penalties and more than $4 million in restitution - which includes a $1 million food contribution to food banks throughout the state and $3.3 million for the cost a five-year statewide program that will fund inspectors for enforcing food transportation laws.