A veteran inspector who surveyed a downtown building weeks before it collapsed, killing 6 people, was found dead from a self-inflicted gunshot wound a week after the accident, authorities said Thursday.

Ronald Wagenhoffer was found shot in the chest in a pickup truck around 9 p.m. Wednesday. A longtime employee with the Department of Licenses and Inspections, Wagenhoffer had inspected the same site of twice in February, and an adjacent, related project in mid-May.

The demolition site consisted of three attached buildings.

Records show that Wagenhoffer inspected the site before work began on Feb. 12 and again on Feb. 25, after it was underway.

He returned to the strip of attached storefronts on May 14 after a citizen complained about the demolition being conducted at the building next door to the one that collapsed. Wagenhoffer found the complaint unfounded. That was three weeks before the vacant four-story building collapsed onto a neighboring Salvation Army thrift store on June 5, killing two employees and four customers and injuring 13 others.

Mayor Michael Nutter and Deputy Mayor Everett Gillison called the 52-year-old Wagenhoffer the seventh victim of the tragedy, and described his death “astounding” and “painful.”

“This man did nothing wrong. The department did what it was supposed to do,” Gillison said at a news conference, adding that Wagenhoffer leaves behind a wife and son.

Department employees were informed of the death Thursday morning. Wagenhoffer was a 16-year city employee who had started with the Department of Public Property and worked his way up through the ranks to building inspector, according to city officials. He was at work until 3 p.m. Wednesday.

The department’s head, Carlton Williams, said Wagenhoffer did everything he could to protect people.

“We strive to protect our citizens by enforcing the building codes. And that’s what Ron did,” Williams said. “He was a dedicated civil servant who loved his job.”

Investigators say a heavy equipment operator with a lengthy rap sheet was high on marijuana when the remains of the four-story building gave way last week. Authorities believe the operator, Sean Benschop, had been using an excavator as a member of the demolition team assigned to take down the building. He faces six counts of involuntary manslaughter, 13 counts of recklessly endangering another person and one count of risking a catastrophe.

His attorney has said he was being made a scapegoat.

The city’s top prosecutor has convened a grand jury to investigate whether anyone else should face criminal charges. A half-dozen survivors have filed lawsuits against the contractor and the building’s owner.

A demolition permit indicates that contractor Griffin Campbell was being paid $10,000 for the job. Campbell’s lawyer has called him despondent but “absolutely not responsible” for the deaths. On Thursday, he released a statement expressing condolences to the families of the inspector and the victims.

“Our heartfelt condolences go to the family of the inspector,” attorney Kenneth Edelin said in a statement. “We also continue to pray for the families of those that were lost, and for the health and speedy recovery of those that were injured.”

A lawsuit filed last week seeks financial damages on behalf of Nadine White, who was buried in the rubble but survived.