A former provider of student lunches for the Boston public schools has filed a lawsuit against the city, alleging that it violated public bidding laws by awarding a contract to a competitor last year.

In the lawsuit filed last week in Suffolk Superior Court, Preferred Meal Systems Inc. said the city wrongfully negotiated a lower price with its only competitor in the bidding process, Whitsons Food Service Corp., and overlooked other aspects of Whitsons’ proposal that failed to meet the criteria the city set for awarding a contract.

Whitsons, of Long Island in New York, submitted a proposal to prepare the frozen meals for $7.8 million annually under a sealed bid that met the city’s filing deadline, according to the lawsuit, and the city later negotiated that bid down to $7.5 million annually.

The lawsuit did not specify the amount of the bid that Preferred Meal submitted, but Matthew Wilder, a school department spokesman, said it was for $8 million annually.

Until last year, Preferred Meal Systems, based in suburban Chicago, had been serving school lunches for about 16,000 students in Boston for six years. The company was expected to win the contract again, until opposition mounted from some students, parents, and fresh-food advocates dissatisfied with the quality of the school lunches.

DINA RUDICK/GLOBE STAFF

Trac Dzuong ate tacos, vegetables, and an orange in school. A food vendor says the city did an unfair deal with a rival bidder.

“The city was biased in its award of the contract to Whitsons,’’ the lawsuit states. “Allowing the city’s contract with Whitsons to continue will cause ongoing harm not only to Preferred Meal Systems, but also to the citizens of Massachusetts and the general public.’’

Preferred Meal is asking the court to immediately nullify the city’s contract with Whitsons and to give the contract to the Illinois firm instead. The company also is seeking an unspecified amount in “damages resulting from the city’s award of the contract to Whitsons in bad faith.’’

‘If students have a well-balanced meal, they will be more ready to learn.’

Superintendent Carol R. Johnson defended the city’s contract with Whitsons, saying the city followed proper bidding procedures and that student lunches this year have more fresh fruits, vegetables, and whole grains than previously.

“Healthy eating is tied to learning,’’ Johnson said. “If students have a well-balanced meal, they will be more ready to learn.’’

The contract in dispute is for one slice of the city’s school lunch program, serving 86 schools, many built decades ago as neighborhood schools without full-service kitchens. These schools, mostly elementary schools, receive previously prepared frozen lunches that are warmed in ovens at each school.

The city’s other schools have on-site kitchens, where meals are made each day. Overall, the School Department provides 35,000 lunches, 23,000 breakfasts, and 6,000 after-school snacks.

Preferred Meal declined to comment through a spokesman, citing a policy of not discussing unresolved litigation.

In its lawsuit, Preferred Meal argued that it was unfair for the city to provide Whitsons an opportunity to negotiate a lower price, while not offering Preferred Meal that same opportunity.

But state law allows a public agency to negotiate an even lower price from the lowest bidder who is most responsive to the criteria the agency set for securing a contract, according to guidelines developed last year by the state Inspector General’s Office.

Preferred Meal’s failure to secure the contract turned out to be an ironic twist. Another potential bidder decided against seeking the contract last year and instead sent a four-page letter to the city, accusing officials of crafting their public bid to favor Preferred Meal - an accusation the city denied.

Some students, parents, and fresh-food advocates disliked Preferred Meal because the company shipped its frozen meals from a facility in Pennsylvania, rather than preparing them locally.

Whitsons also prepares its meals outside of Massachusetts, shipping them to schools a day before the entrees are served. But Johnson said the company tends to serve more produce grown across New England, complementing the frozen dishes with fresh apples, berries, and other items.

To emphasize her point about the nutritious lunches, Johnson invited a reporter Thursday to the Roger Clap Innovation School in Dorchester. There, in the basement of the tiny red-brick schoolhouse built more than a century ago, about 50 kindergartners sat around several tables, munching on chicken burritos, rice, bright yellow corn and red peppers, and fresh oranges.

“Do you like the school lunches?’’ Johnson asked a group of students, as she leaned in close to the table.

“I like the oranges,’’ answered 4-year-old Emma Nyugen, as she chewed an orange wedge she held close to her lips with both hands.

At another table, 5-year-old Dwight Banton shoveled generous portions of chicken and corn into his mouth, prompting Johnson to remark, “I see someone who really enjoys his vegetables.’’

When he finished, Johnson gave him a high five.

Asha Park-Carter, a kindergarten teacher, said the lunches have improved vastly from last year.

“It used to make me mad the food they would get,’’ said Park-Carter, as she gathered the children for recess. “They are young learners and growers and they need to get the same kind of food students get in places like Brookline.’’