An elementary school teacher retiring after a 36-year career died of a heart attack moments after saying goodbye to her final class for the summer.

Sharon Smith, 57, died Friday on the way to a hospital according to her niece, Doreatha Jackson. Smith was a fourth grade teacher at Molino Park Elementary School, where she had worked since 1972.

Principal Alice Woodward said students had not been gone more than five minutes before Smith complained of shortness of breath and an ambulance was called.

"Any child who had her would tell you Sharon was their favorite teacher," said Woodward in an interview with Pensacola News Journal. "She had a caring attitude and saw something good in every child and every teacher."

Click here to read the full report in Pensacola News Journal.

The Associated Press contributed to this report.