Taylor Dorman, 16, was struck in the chest by a softball while playing "over-the-line" during a physical education class around 11 a.m.
According to school officials, Dorman appeared fine following the hit and even cracked a few jokes. About 20 minutes later, however, Dorman collapsed and was airlifted to Palomar Medical Center. He died a few hours later.
"Upon admission to the emergency department, the decedent had an irregular heartbeat and was taken into the intensive care unit," according to a statement from the San Diego County Medical Examiner's Office.
Numerous attempts to stabilize Dorman's heart rhythm were made to no avail.
"Lifesaving measures were discontinued and death was pronounced", the statement concluded.
Students, faculty, and staff are still trying to cope with the loss of the well-liked sophomore who happened to be celebrating his 16th birthday Wednesday. Counselors were on campus Thursday to help students and staff deal with the unexpected loss.
"He was never mean to anybody; totally the guy who walks up and cheers up your day," said Navar Findley, Dorman's best friend.
The Associated Press contributed to this report.