DES MOINES, Iowa — Des Moines council members have approved a plan to keep the proposed federal courthouse replacement from being built at the old YMCA site downtown, preserving the property for private development.

The City Council voted Monday for an agreement that would require that Des Moines buy the land from Hubbell Realty Co. for $5.2 million if Hubbell doesn’t develop the land by May 31 next year. Hubbell would withdraw the property from consideration for the courthouse in return.

The federal government’s selection of the YMCA site was a setback for city officials, who want the courthouse built in the Market District, which is transforming from an industrial area into a district of apartment buildings, restaurants and shops.

Courthouse construction is set to begin in 2019.