The New York City Triathlon was canceled on Thursday, a day after Mayor Bill de Blasio urged race directors not to hold the event as scheduled on Sunday, when severe heat is expected. But race organizers said Friday that the event would continue to be in July for the foreseeable future despite problems with the heat.

Life Time, the company that runs the triathlon, said in a statement that it had made the decision with guidance from city officials and that all registered participants would receive a full refund. It cost $338 for the first 1,000 entries and as much as $399 for the rest.

This is the first cancellation of the triathlon, which was founded in 2001.

“Unfortunately there is always a risk to putting an event on like this,” said Scott Hutmacher, the brand manager for Life Time Tri. “We don’t have a say in how the weather gods operate.”

“This difficult decision was made following a comprehensive review and, ultimately, with the goal of prioritizing the safety of everyone participating in or otherwise involved with the execution of the event,” the Life Time statement said.