New York City mayoral hopeful Andrew Yang faced widespread criticism on social media Monday after he indicated that his family has avoided spending too much time in the city in recent months because of the difficulty of working from a two-bedroom apartment during the coronavirus pandemic.

In an interview with the New York Times on his upcoming mayoral bid, Yang said his family has "spent more time upstate" at their home in New Paltz due to a lack of space at their New York City apartment. Yang, the father of a son with autism, noted the decision was necessary for work-life balance.

"We live in a two-bedroom apartment in Manhattan," Yang told the newspaper. "And so, like, can you imagine trying to have two kids on virtual school in a two-bedroom apartment, and then trying to do work yourself?"

Yang’s comment went viral on social media within hours of the interview’s publication. Critics were quick to note that countless New Yorkers experienced the same cramped conditions for months since the pandemic forced a shift to remote work and schooling.

"I hope everyone enjoyed the Andrew Yang mayoral campaign because it is now over," New York Post columnist Karol Markowicz wrote on Twitter. "Every New Yorker living exactly like this, and there are many, many, many, just had smoke come out of their ears."

New York City Council member Jimmy Van Bramer, a Democrat, also took aim at Yang’s remarks.

"I’d like to introduce Andrew Yang to my mother who raised 8 kids in a three-bedroom apartment in Astoria working three jobs and barely had the money to make the rent, let alone have a second home in New Paltz! She just did it. Like so many New Yorkers do," Van Bramer wrote on Twitter.

The backlash marked an early setback for Yang, who is already facing questions about the strength of his ties to the New York City area. The tech entrepreneur filed paperwork for his mayoral run in December and could formally announce his bid as early as this week, according to the Times.

Yang sought to clarify his comments in a follow-up statement.

"Every New York parent has struggled with educating our children in a time of COVID. I’ve been proud to live, work and raise my kids in this city for 25 years," Yang said. "After COVID shut down our public schools, we took our two kids, including my autistic son, to upstate New York to help him adapt to your new normal.

CLICK HERE TO GET THE FOX NEWS APP

"Evelyn and I know how lucky we are to have that option, which is why I’ve committed the past several years of my life to lifting up working families and eliminating poverty. We have a lot of work to do to safely reopen our schools and get New York back on its feet," he added.

Once relatively unknown in the political world, Yang gained a following during his upstart bid for the 2020 Democratic presidential nomination.

During his campaign, Yang championed a plan for universal basic income known as the "Freedom Dividend," which called for Americans to receive $1,000 per month from the U.S. government. Yang is expected to announce a similar initiative during his mayoral campaign, Politico reported.