HONOLULU (AP) — A Honolulu mall had an obligation to care for a pregnant woman after she got stuck in an exhaust duct at the shopping center in 2005 and later died, even if she was trespassing on its roof, the Hawaii Supreme Court ruled.

The opinion issued Thursday also upheld parts of a lower court’s ruling in favor of the mall, finding Ala Moana Center couldn’t be held liable for failing to anticipate that the woman would sneak onto the roof and end up in the vent. The case now goes back to Circuit Court.

The family of Jasmine Rose Anne Fry, 22, filed a wrongful death lawsuit, claiming Ala Moana was negligent and failed to care for Fry and her unborn baby.

Fry was six- to eight-weeks pregnant when she somehow accessed the roof, squeezed into the duct above the food court, and got trapped in a stove hood, according to the Supreme Court’s opinion. The medical examiner determined she was suffering a psychotic episode, based information about the circumstances leading to her death.

The ruling said Fry died of hyperthermia after rescuers removed her from the duct.

“We are very happy that we are going to get our day in court,” Myles Breiner, one of the family’s attorneys, said Friday. “We can resume litigation and get this matter before a jury.”

The high court said the shopping center “had a duty to exercise reasonable care to control those factors to prevent them for doing harm to Fry, even if she was a trespasser.”

A maintenance worker found Fry on the roof, barefoot and dressed in shorts and a tank top. She had grease smeared on her feet, hands, hair and face, and told the worker she was a contractor hired to clean grease from an exhaust fan.

He thought it was odd and said the woman seemed to be acting erratically, jumping on the duct and saying there was a baby inside, according to the court’s opinion. Her jumping broke a hole in the metal, and she squeezed her way in. The worker called security.

Fry fell four stories and landed above a deep fryer in the food court, Breiner said.

Employees eventually turned off the stoves. While trapped, Fry told a security officer she was on the roof because “she wanted to be free.”

No one from Ala Moana called emergency services until about 20 minutes later, according to the ruling. The first call was to police to say a woman broke into the duct and was crawling through without authorization. Later, another call asked for help getting her out of the duct.

Frye was transported in critical condition to a hospital, where she was pronounced dead.

General Growth Properties Inc., which owns and manages Ala Moana Center, declined to comment on the ruling.

Michael Green, another attorney representing Fry’s family, said it’s still not known how Fry was able to access a series of locked doors to get up on the roof. “We’re convinced someone took her up there,” he said.