The city has finalized a nearly $77 million emergency contract to shelter migrant families at 15 hotels in Brooklyn, Queens and the Bronx, officials said Wednesday.

The hotels will reserve rooms for asylum-seeking families for up to 28 days under the contract with the Hotel Association of New York City, a spokesperson for the city’s Department of Housing Preservation and Development confirmed.

Rooms will be available through the month of July. The hotels are meant as a backup plan if space runs out at city shelters.

After 28 days, families who are still seeking shelter will be directed to the city’s Humanitarian Emergency Response and Relief Centers to receive another placement.

HPD’s spokesperson said the contract will give the city the time and space to negotiate future rates as officials continue to respond to the migrant crisis.

“New York City has led the nation in responding to this national humanitarian crisis, providing compassion, care, shelter, and vital services to more than 170,700 migrants who have come through our care since spring 2022,” the spokesperson said in a statement. “Thanks to around-the clock work of city workers, we’ve ensured every single family with children has a bed to sleep in and a roof over their heads, while working to reduce costs and help people move out of shelter and stabilize their lives.”

“This contract allows the city to negotiate competitive rates as we continue responding to this unprecedented crisis,” the spokesperson added.

The contract comes a little over a year after the Adams administration inked a $275 million deal with the same hotel association to house at least 5,000 migrants.

The mayor has repeatedly called on the federal government to provide more aid to New York City to help cover migrant-related costs.

The Biden administration last year allocated $140 million to New York to address the situation.

A state budget proposal Gov. Kathy Hochul unveiled earlier this month, meanwhile, includes $2.4 billion to house migrants without homes and help them apply for asylum or work.