(CNN)Organizers were hoping OZY Fest would be hot -- but not this hot.
The New York festival has been canceled because of heat, Mayor Bill de Blasio announced Friday afternoon.
Scheduled for this weekend in Central Park, the cultural festival, now in its fourth year, had a lineup that included John Legend, Trevor Noah, Megan Rapinoe, Padma Lakshmi, Malcolm Gladwell, Spike Lee and Mark Cuban.
Organizers warned attendees on Twitter earlier in the week that despite the increasingly high temperatures, "we're committed to making sure everyone is safe and comfortable." And on its website, it promised, "There will be unlimited free water, misting fans, shaded areas, heat relief tents, sunscreen dispensers and ice stations all weekend-long at OZY Fest."
The cancellation appeared to come as a surprise; as recently as 30 minutes before the announcement, OZY Fest tweeted, "A limited number of Sunday tickets and weekend passes are still available, be sure to get yours today."
But in a statement forwarded by the organizers later Friday, de Blasio said the city decided to cancel all large-scale park events, including their own, over the weekend for health and safety reasons.
They added that it would have been "impossible" to find an alternate location.
"We absolutely cannot put any festival-goers at risk. We are so disappointed, and we hope to work with the City of New York in the future," OZY CEO Carlos Watson said.
All tickets will be refunded.
Earlier Friday, New York City Triathlon officials canceled that race, citing high temperatures and humidity expected to be beyond safe racing conditions.
The National Weather Service has put New York City under an excessive heat warning from noon Friday until 8 p.m. Sunday. That kind of warning is issued when the combination of heat and humidity is expected to make it feel like it is 105 degrees or more.