Updated

A federal judge on Thursday ordered delivery giant UPS Inc. to pay New York City and the state nearly $247 million in damages and penalties for illegally shipping cigarettes.

U.S. District Judge Katherine Forrest handed down the penalty after finding the company liable in a civil case in federal court in Manhattan in March, saying the company ignored "red flags" that its brown trucks were being used to transport untaxed cigarettes from Indian reservations,

New York state and New York City sued Atlanta-based UPS in 2015. The lawsuit accused it of having a corporate culture that favored sales opportunities over a responsibility to following regulations helping New York enforce tax law.

"We are pleased that the award of nearly $247 million to the city and state reflects the serious nature of the offenses at issue," the city's chief lawyer, Zachary Carter said. "Cigarette smoking is a leading cause of preventable death and the city and the state will continue in their efforts to protect the public health."

In Thursday's decision, the court awarded the state $165,817,479 and the city $81,158,135.

In a statement, state Attorney General Eric Schneiderman called it a win for New Yorkers and their public health.

"As the court agreed, UPS repeatedly violated a number of state and federal contraband cigarette trafficking laws — as well as its own agreement with the State — by shipping hundreds of thousands of cartons of cigarettes to consumers in New York," he said.

UPS said it would appeal the decision, calling it "excessive and far out of the bounds of constitutional limits, particularly given that the shipments at issue generated around $1 million in revenue."

The suit alleged that tobacco retailers located on upstate reservations were given price discounts for shipping in volume. It said delivery drivers were allowed to accept iPads and other gifts from shippers and that account executives, whose compensation was tied to keeping big accounts, ignored signs that some customers signing delivery contracts dealt in cigarettes.

UPS argued it followed the rules and can only do so much to police what its 1.6 million daily shippers send in sealed packages.

"New York's action sought to force UPS to serve in a quasi-law enforcement role which involved monitoring, inspecting and reporting package contents, which is not appropriate for a common carrier," UPS spokesman Steve Gaut said in a statement.

"The Court found UPS in full compliance since 2015 and rejected the request for an injunction or appointment of a monitor," Gaut said. "New York abandoned a collaborative system to identify and remove illegal cigarette shipments that worked well for years in favor of a lawsuit to seek a monetary windfall."