In this April 4, 2014, file photo, a sign with the old GrubHub logo is displayed is displayed on the door to a New York restaurant. Credit: Mark Lennihan / AP

BOSTON — Online food delivery platform Grubhub charged some Massachusetts restaurants illegally high fees during the coronavirus pandemic, the state attorney general’s office alleged in a lawsuit filed Thursday.

The suit, filed in Suffolk Superior Court, seeks refunds for those restaurants as well as civil penalties, the office said in a statement.

According to the suit, Grubhub violated legislation that prohibited third-party delivery service platforms from charging fees to restaurants that exceed 15 percent of an order’s menu price.

The fee cap went into effect on Jan. 14 and ended June 15 when Massachusetts’ state of emergency was lifted.

The complaint says Grubhub routinely charged fees to restaurants that exceeded 18 percent of the order’s menu price.

“We allege that Grubhub knowingly and repeatedly violated the fee cap statute, raising costs by thousands of dollars and harming restaurants that were already financially distressed and trying to survive,” Attorney General Maura Healey said.

A Grubhub spokesperson called the allegations “baseless.”

“Serving restaurants is at the heart of everything we do at Grubhub and we strongly disagree with the allegations in this lawsuit,” Grant Klinzman said in an emailed statement. “While we do not believe the temporary price control was either legal or appropriate, we complied with it while it was in effect and for an additional month after it expired, effectively conveying millions of dollars to local restaurants across Massachusetts.”

Healey in a statement said her office sent letters to Grubhub and other online food delivery service platforms in February reminding them that the 15 percent fee cap was in place. The attorney general’s office then sent a cease-and-desist letter to Grubhub in May.

Demand for food delivery soared during the coronavirus pandemic and several states and cities placed caps on fees.