Mayor Bill de Blasio refused to comment at a Friday afternoon press conference when asked about his decision to hit the gym while his police and fire commissioners dealt with a standoff in Staten Island.

The mayor spent two hours at a Brooklyn YMCA Friday morning, leaving others to handle a Staten Island standoff following the shooting of a city firefighter. Police shot and killed the suspect midday.

The mayor’s press aides confirmed that he was working out at the YMCA on Ninth Street in Park Slope. He was there from roughly 9 a.m. to 10:40 a.m. They said the mayor was on the phone getting briefed by both the police and fire commissioners starting early in the morning.

Later in the day Friday, de Blasio visited the wounded firefighter at the hospital.

At one point, a press aide retrieved the mayor's suit from his SUV parked in front and brought it to him inside.

As NY1’s Grace Rauh reported, de Blasio exited the gym through the rear door apparently to avoid "the visual" of him leaving the gym. Rauh was waiting at the front door while the mayor was working out inside.

The mayor has continued to work out at the Park Slope gym, which he frequented before moving to Gracie Mansion on the Upper East Side.

De Blasio provided a update on the firefigher and the situation Friday afternoon. 

When asked about his workout, the mayor refused to engage.

"We are briefing you all on a very serious issue, and that is just not a serious question," de Blasio said.

His gym visit, though, clearly hit a nerve. On social media, critics piled on. One produced an image of the mayor burning calories while the city burned behind him.

Joe Borelli, a Republican Staten Island Assemblyman who is running for City Council, piled on.

"The Mayor has once again missed an opportunity to demonstrate support for our first responders as one of them lay shot on a hospital stretcher. It's almost incomprehensible," Borelli wrote.

State Senator Diane Savino, though, backed de Blasio up.

"Elected officials don't belong on the scene. We really don't," she said.

Rauh also added that this plays into criticism that the mayor has been out of touch with local issues and instead focuses too much on his national agenda.