PORTLAND — Maine’s supreme court has ruled that victims of the Hannaford supermarket chain’s massive data breach cannot sue for damages if they didn’t suffer financial losses, physical harm or identity theft.

U.S. District Court Judge D. Brock Hornby last year asked the Maine Supreme Judicial Court to decide if consumers who had been reimbursed for losses from stolen credit card numbers have the right to seek damages for the time and effort it took to straighten out their accounts.

In a unanimous decision today, justices ruled that time and effort alone do not constitute an “injury” for which damages may be recovered under Maine law.

Barring an appeal, the decision in effect puts an end to a lawsuit against the Scarborough-based supermarket giant.