A San Francisco high school senior faces possible eviction from his public housing unit after his sole guardian, his grandmother, died of cancer last month.

The property manager of Valencia Gardens planned to boot the family prior to the grandmother’s death because of alleged “criminal activity” at the two-bedroom apartment and unauthorized people staying there.

Eviction proceedings began late last year when the teenager, Terrance Hall, was still a minor. He turned 18 in January, his grandmother died in February, and now he is fighting in court to continue living in the apartment he’s called home since he was 5.

Three days after his grandmother died, Hall got a sheriff’s notice to vacate. He has not been accused of taking part in the “criminal activity.” The notice referred to the actions of a woman in 2017 and 2018 — including violating probation, possessing stolen property and making threats.

In a court order Tuesday, San Francisco Superior Court Judge Charles Haines said the eviction does not apply to Hall, only to his deceased grandmother, Patricia Harrison.

“ANY WRIT OF EXECUTION DOES NOT APPLY TO TERRANCE HALL,” Haines wrote by hand at the bottom of the order.

Yet the John Stewart Co., the property management company, is continuing attempts to enforce an eviction. An attorney for the company alongside a sheriff’s deputy came to Valencia Gardens on Wednesday morning but postponed action after Darren Orr, Hall’s attorney, gave the Sheriff’s Department a copy of the order, Orr said.

Nancy Crowley, a sheriff’s spokeswoman, said there were no plans Wednesday to evict Hall because the court order was not clear and because the deputy received Hall’s claim of right to possession, which continues to be litigated.

Anna Chun, an assistant vice president of John Stewart, said the company was aware of the death of Hall’s grandmother and was working to find him transitional housing.

Yalonda M. James / The Chronicle

“At this point, the eviction still has to happen,” Chun said.

Darren Orr of Bay Area Legal Aid, the pro-bono attorney for Hall, said he expects the company to continue seeking Hall’s eviction. Another hearing is set for Tuesday on Hall’s claim of a right to possession.

“This is a tremendous waste of resources on the part of the city, which is funding John Stewart to pay their attorney thousands of dollars to oppose motions that don’t need to be opposed for John Stewart to maintain its rights,” Orr said. “Subsidized housing providers have an obligation to only use eviction as a last resort.”

Rose Marie Dennis, a spokeswoman for the San Francisco Housing Authority, declined to comment on the case.

The lawyer for John Stewart, Mercedes Gavin, said it was “a lie” that Hall, a senior at Galileo High School, has no other place to live and would become homeless if he were evicted. Gavin said a 15-year-old sister of Hall was able to move in with her mother.

“They have a long history of crime associated with the unit and a long history of unauthorized occupants and finally the property manager served a notice terminating the tenancy,” Gavin said. “So they don’t have any legal right to live there. It’s unfortunate that his guardian passed away, but that doesn’t change the fact that there was criminal activity occurring at the unit.”

Gavin said the crimes were related to threats, drugs and stolen property. She said she filed “over a hundred” pages of police reports in court, although none of the reports involved Hall specifically.

Chun said Gavin does not speak on behalf of John Stewart. The company is one of the largest managers of affordable housing in California, with more than 100 properties in its Bay Area portfolio alone.

Orr, Hall’s lawyer, said the teen was not responsible for any alleged crimes at the property because he was not an adult or head of the household at the time they were said to have occurred.

Hall said taking care of his grandmother, then mourning her loss amid the eviction fight, has been difficult and that he’s fallen behind in class. He said he still wants to finish high school, play sports again and get a catering job where a friend works.

“I never knew about what was going on at the time. My grandma never told me nothing,” Hall said. “She didn’t want to tell me any bad news so I wouldn’t do anything bad. She wanted me to be cool and stay calm. It’s been hard.”

Kimberly Veklerov is a San Francisco Chronicle staff writer. Email: kveklerov@sfchronicle.com Twitter: @kveklerov