NEW YORK - Despite warning New Yorkers to stay home amid the ongoing Coronavirus outbreak, Mayor Bill de Blasio was spotted at the Park Slope YMCA Monday morning, just hours before Gov. Andrew Cuomo announced a state-wide ban on gyms, restaurants and bars which goes into effect at 8 p.m. Monday.

The mayor’s visit to the gym contradicted the advice he’s been giving New Yorkers in recent days as the Coronavirus continues to spread and rules about public gatherings become more stringent by the day.

A spokesperson for the mayor confirmed de Blasio was at the YMCA Monday morning around 9 a.m. but declined to say how long de Blasio spent working out.

“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,” Freddi Goldstein, a spokesperson for de Blasio said in a statement. “That doesn’t change the fact that he is working around the clock to ensure the safety of New Yorkers. After today gyms will close and he will no longer be visiting the YMCA for the foreseeable future,” she added.

De Blasio’s YMCA routine has been a constant during his time in office.

The mayor is driven from Gracie Mansion in the Upper East Side, 12 miles to the Park Slope facility in Brooklyn.

Rebecca Katz, a former top aide to de Blasio took to Twitter to criticize her former boss.

"No current or former staff member should be asked to defend this. The Mayor’s actions today are inexcusable and reckless," Katz wrote.

Jonathan Rosen, a former advisor to the mayor also took to social media, calling the mayor’s decision to work out on Monday, "Pathetic, self-involved. and inexcusable."

Earlier on Monday, the mayor signed an executive order ordering bars and restaurants to provide takeout options only. He also ordered large venues and senior centers, but that order became moot just hours later when Gov. Cuomo announced a state-wide ban for all bars, restaurants and gatherings of 50 people or more beginning Monday at 8 p.m.