Boston has earmarked $7.5 million toward creating and preserving affordable housing and protecting tenants, Mayor Marty Walsh announced Tuesday. 

The pilot program targets developers, providing loans to help them purchase occupied multifamily rental properties; in return developers will be required to maintain affordable rent levels in their units for at least 50 years.  

RELATED: New report shows how Boston home prices vary by T stop

"Boston is committed to making our city a home for everyone, no matter their age, background or financial status," Mayor Walsh said. "This $7.5 million investment is another leap towards creating affordable housing for all our residents."

"The Acquisition Opportunity Program ensures Boston residents will not be priced out of their homes and neighborhoods," he said.

Through the program, which operates under the city's Department of Neighborhood Development, Boston residents who otherwise could not afford market rent rates will have access to affordable housing.

RELATED: Is the CPA tax surcharge right for Boston?

It will also shield tenants against the threat of displacement through gentrification by ensuring affordable rental rates over the long term. Developers are required to agree that no tenant in good standing will be displaced from their unit.

According to the Boston Business Journal, the city hopes to set up 100 units of affordable, deed-restrictive housing.