(CNN) — A high school senior from Johnson City, Tennessee, received his diploma in a special graduation ceremony just days before his death after a long fight with Duchenne muscular dystrophy.

Dakota Johnson had been enrolled in homebound schooling through the Johnson City school district since he was in seventh grade. He told teacher Allison Russell he had two goals for his senior year — to go to the prom and to graduate from Science Hill High School, according to CNN affiliate WJHL in Johnson City. He accomplished the latter.

Johnson, who was raised by his grandmother, completed all his school work, but his illness prevented him from being able to walk at his graduation ceremony. Russell decided to bring the graduation to Johnson after he was admitted to the hospital for heart failure.

“What mattered most to me is that I wanted Dakota to experience that and his grandmother to experience that,” the teacher told WJHL.

The ceremony took place Wednesday in his hospital room at Johnson City Medical Center, and the student had pictures taken with family and friends while dressed in his cap and gown.

Johnson’s aunt Susan Breeden told WJHL that the ceremony meant so much to his family, “Thank you for honoring him, the nurses at the hospital, and the school system. We are forever grateful for their kindness.”

Johnson died two days later, on Friday, according to family. He was 19.

“It was such a blessing that he was able to receive his diploma before he passed,” family friend Carrie Stamper Medley told CNN. “It’s like God was waiting to take him.”

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox