NEW YORK — New York City has canceled 23,000 first-dose COVID-19 vaccine appointments this week due to its dwindling supply of shots, Mayor Bill de Blasio said at a press conference Wednesday morning.

De Blasio said the appointments could be rescheduled if the city were allowed to use its supply of about 65,000 vaccine doses currently reserved for second doses.

“We've got something right in front of us today,” de Blasio said. “The fact that we’re going to have to cancel tens of thousands of appointments today for folks who need a first dose, that's something we should avoid at all costs when we have 65,000 doses sitting on the shelf.”

Dr. Dave Chokshi, head of the city’s health department, said that the appointment cancellations will not affect second dose appointments.

In a statement released Wednesday afternoon, the health department said it would reschedule the canceled appointments on the same days and times next week.

A City Hall spokesperson also said that it was temporarily closing 15 of its vaccination hubs Thursday and Friday because of a lack of vaccine doses to administer. The spokesperson did not specify which sites would be closing.

The canceled appointments come as the city has immunized just under half a million people, including nearly 40,000 on Tuesday, the highest 24-hour total thus far.

“The pace is gaining every day,” de Blasio said. “We need the freedom to vaccinate.”

On Tuesday, de Blasio warned that the city was set to run out of vaccines on Thursday, leading to canceled appointments from Friday through the following Tuesday, when the city was then expecting its next resupply of vaccines from the state.

De Blasio said he expected the incoming administration of President Joe Biden to invoke the Defense Production Act to speed up supply of the vaccine from manufacturers.

The city saw a delay in its latest shipment of the Moderna vaccine, with 103,400 doses that were supposed to be delivered Tuesday coming over the course of Wednesday and Thursday. The shipment was roughly split between doses meant for first and second vaccinations.

De Blasio also said that the city was planning to vaccinate 50,000 people aged 65 and older living in public housing “in the coming weeks.” He said that the city administered 1,579 doses at three vaccination sites at public housing locations since Saturday, at the Cassidy-Lafayette Houses on Staten Island, the Polo Grounds Towers in Manhattan and the Van Dyke Houses in Brooklyn.

“The bottom line is, no one is more needy than fellow New Yorkers who live in public housing,” de Blasio said.