The rector of an Ocean City church has died from injuries he sustained in a blaze that consumed the offices of St. Paul’s by-the-Sea on Tuesday, according to the Episcopal Diocese of Easton.

The Rev. David Dingwall was the second person killed by the morning blaze, which also left a third person with life-threatening injuries, diocese and fire officials said.

“I will remember [Rev. Dingwall] as a bright fellow with a charming sense of humor,” said diocese Canon Heather Cook. “He had a great heart for the community.”

Firefighters were called to the church around 9:25 a.m. on Tuesday, said Jessica Waters, a spokeswoman for Ocean City. They found a building that houses the rectory offices and a homeless outreach program engulfed in flames.

Waters said that the fire was quickly brought under control, but that the offices were significantly damaged. Dingwall and an unidentified woman were transported to a local hospital with life-threatening injuries, including burns and smoke inhalation. An unidentified adult male was pronounced dead.

Cook said the rector had a distinctive look — he had a pierced ear and wore Crocs with his vestments. He was also instrumental in creating a community ministry with a $1 million donation left by a benefactor. Dingwall has been pastor of the church since 2005.

Waters said there was only minor damage to the sanctuary area of the church, which has 240 parishioners and was founded in 1878.

The cause of the blaze is under investigation.