A boy wounded in a shooting at his San Bernardino elementary school has been released from the hospital.

Briana Pastorino, a spokeswoman for Loma Linda University Hospital, says 9-year-old Nolan Brandy was released Friday.

A San Bernardino school spokeswoman says he will continue recovering at home.

Nolan's parents told CNN earlier Friday that they were thankful their son was in "good spirits." They said he was recovering better than they had expected.

Nolan was shot Monday when Cedric Anderson opened fire in his estranged wife's classroom before taking his own life.

Authorities say Anderson was targeting his wife, Karen Elaine Smith, but also struck two of her students. Smith and 8-year-old Jonathan Martinez were killed.