A surface parking lot behind the federal courthouse at Seventh and Mission streets in San Francisco will become the site of the city’s largest housing development for formerly homeless people, thanks to a deal struck this week between city officials and the federal government.

The city will lease the parking lot for three years while it pulls together the funding and irons out construction logistics for the development, which will house 250 units in two separate buildings. One of the buildings will be designated for 100 homeless seniors 62 years of age or older.

San Francisco Mayor Ed Lee introduced a proposal to acquire the lot at 1064 and 1068 Mission St. in late April, and negotiations have been ongoing with the federal government since then. The lot provides parking for the building that houses the Ninth U.S. Circuit Court of Appeals.

“When it comes to finding housing for people formerly living on the street, we will pursue any and every avenue imaginable and this is the latest example of that commitment,” Lee said in an email sent by a spokeswoman.

Under the terms of the deal, the city will be able to purchase the lot outright for $1 once the funding is secured and construction is ready to begin. The city values the lot at around $36 million, but under a 1987 law the federal General Services Administration can relinquish property to local governments for a nominal fee, provided that it’s used for homeless services.

“It’s a really exciting opportunity for the city to be able to acquire a high-value property at such a discounted price,” said Mara Blitzer, director of housing development for the Mayor’s Office of Housing and Community Development.

Given the property’s close proximity to public transportation and other amenities, “it’s essentially perfect for permanent, supportive housing,” Blitzer said.

Like the Rene Cazenave Apartments on Essex Street and the Drs. Julian and Raye Richardson Apartments on Fulton Street, the new buildings will provide their future tenants with on-site access to case workers who can help connect them with a range of services, including mental and physical health care, and money management assistance, Blitzer said.

It’s a model of housing and care that’s been proved to work in San Francisco, Blitzer said.

“This is the kind of housing we know works for folks who have been homeless, because it provides housing with affordable rent and it offers services to residents that helped them stay housed,” she said. “And we know it works because people stay housed and their well-being is improved.”

Construction is to begin in 2019. The next step for the city will be the completion of an environmental assessment for the lot in the next 90 days, a requirement under federal law. That assessment must be approved by the U.S. Department of Health and Human Services, which must issue a recommendation to the GSA before construction can begin.

Dominic Fracassa is a San Francisco Chronicle staff writer. Email: dfracassa@sfchronicle.com Twitter: @dominicfracassa