Uvalde, Texas CNN  — 

The last time AJ Martinez was in school was May 24, when he was shot through the thigh as he hid under backpacks while a gunman murdered his two teachers and 19 fellow students at Robb Elementary in Uvalde, Texas.

He saw the shooter come to his classroom and heard him tell his teacher, “Goodnight,” before he unleashed a torrent of shots from his assault-style rifle. AJ also heard law enforcement officers outside in the hallways during the 77 minutes that it took from the time the gunman entered the small-town school to when he was ultimately confronted and killed.

AJ left school that day with someone else’s blood on his face, likely from lying on the floor with the dead and the injured. Since then, he’s been sad, he’s been angry and he’s been fearful. And he’s done a lot of physical therapy.

But when the new school year began Tuesday, AJ, now 10, walked up with a broad smile on his face.

AJ Martinez arrives for the first day of school in an upbeat mood.

“I slept good,” he told CNN, wearing a maroon T-shirt with pictures of his slain teachers, Eva Mireles and Irma Garcia, and the 19 lost children with the words, “My teachers and classmates forever.”

Robb Elementary is closed and its students have been spread out across other institutions and virtual schooling. The graduating fourth graders were always set to move, but it is still hard.

“I’m nervous because I’m not used to this school,” AJ conceded, his smile still strong.

It was his decision to go back to in-person schooling, his mom Kassandra Chavez said. She walked next to him on the first day and did not share her son’s buoyant outlook.

“I’m just nervous,” she said. “I’m just trying to be there supporting him. That’s all I can (do).”

AJ's mom, Kassandra Chavez, says she is doing her best to support AJ and her other two children.

Chavez wore an “Uvalde Strong” T-shirt honoring the victims and all who were left. Many of the staff at AJ’s new school also had on the maroon and white of Robb Elementary.

AJ said he wasn’t sure if there would be new friends at his new school, Flores Elementary. His smile faded for just a moment when he was asked about the children on his shirt, the ones who don’t get to go back to school.

AJ heads in for his first day at Flores Elementary.

In July, his mother told CNN the advice she gave him when he became angry that he would never see his teachers and classmates again.

“You have to be strong,” Chavez said she would tell him, “Because that’s what they would want you to do. Remember them, carry their legacy, like they would want you to do.”

So, wearing their images proudly on his chest, AJ got ready for school.

And with the excitement and trepidation of any first day, he walked into fifth grade.

CNN’s Shimon Prokupecz and Matthew J. Friedman reported this story from Uvalde, Texas, and Rachel Clarke wrote in Atlanta.