Members of the media, including liberal MSNBC host Chis Hayes, condemned New York City Mayor Bill de Blasio after CNN reporter Andrew Kaczynski caught him at a Brooklyn gym amid the growing coronavirus pandemic.

Kaczynski tweeted images of de Blasio’s car parked outside a local YMCA, noting that the mayor “refused to comment” about whether or not he snuck in a workout as his city has shuttered bars, restaurants and movie theaters in an attempt to stem the growing number of coronavirus cases.

MSNBC's Hayes blasted de Blasio when he saw Kaczynski’s tweeted.

CORONAVIRUS HAS NEW YORKERS WAKING UP IN A CITY THAT NEVER SLEEPS TO BIG CHANGES

“Just the latest in a string of very worrying signs that the Mayor simply does not grasp the enormity of what might be about to hit New York City,” Hayes tweeted.

New York Gov. Andrew Cuomo has ordered all gyms and fitness facilities to close by 8 p.m. ET on Monday.

Mayor de Blasio’s spokesperson attempted to defend his workout amid the backlash.

CLICK HERE FOR FULL CORONAVIRUS COVERAGE

“The YMCA has been a huge part of his and his family’s life, like it has been for a lot of New Yorkers. It’s clear that’s about to change and before that, the mayor wanted to visit a place that keeps him grounded one last time,” a spokesperson told NBC’s New York affiliate. "After today, gyms will close and he will no longer be visiting the YMCA for the forseeable future."

Not everyone was happy with de Blasio’s excuse.

“There’s something wrong with de Blasio,” journalist Yashar Ali wrote. “What a disgraceful leader.”

Others took to Twitter with feedback:

The mayor recently appeared on Hayes’ network and called the coronavirus pandemic a “war-like situation.”

“This is a case for a nationalization, literally a nationalization, of crucial factories and industries that could produce the medical supplies to prepare this country for what we need,” de Blasio told MSNBC’s Joy Reid on Saturday, calling for “24/7 shifts.”

CLICK HERE FOR THE FOX NEWS APP

Sunday evening, it was announced that New York City schools will be shutting down until at least April 20, a measure de Blasio previously had resisted, despite facing pressure to do so

The city has also taken drastic steps to deal with the crisis, forcing restaurants to limit themselves to takeout and delivery service, and closing many establishments to prevent the spread of the virus through crowds.

Fox News’ Travis Fedschun and Ronn Blitzer contributed to this report.