The Microsoft Visitor Center in Redmond, Wash. (AP) (Ted S. Warren/AP)

Microsoft has pledged $500 million to address homelessness and build affordable housing units in the Seattle and Puget Sound area, a region that has grown prosperous as the tech industry has swelled but is increasingly plagued by an affordable housing crisis.

Half the money will be allocated to supporting low-income housing in King County, which includes Seattle and surrounding areas such as Redmond, where Microsoft is based, the company said in its announcement Wednesday.

Another $225 million will support the preservation and development of middle-income housing on the county’s east side. The remaining $25 million will be used to fund programs that address homelessness, including a $5 million effort between Seattle and King County, and another $5 million to a United Way program that will offer legal representation and other information to help prevent homelessness.

The splashy pledge represents one of the more ambitious efforts on behalf of the company to make a dent in growing societal problems around housing affordability and economic inequality. And it comes at a fraught time for both tech companies and the cities that house them, as skyrocketing home prices have significantly outpaced median income increases in many of these areas in recent years, with little relief in sight. In the Puget Sound region, these issues have been particularly acute: Home prices rose 96 percent between 2011 and 2018, while median household income was up only 34 percent, Microsoft noted.

Tech companies in cities such as Seattle and the San Francisco Bay area have become the focus of efforts to address issues like homelessness that have been linked to the rising cost of living.

In Seattle, a new tax to make businesses contribute a set amount per employee for homeless services and affordable housing was repealed after fierce opposition from Amazon and other large businesses. (Amazon founder Jeffrey P. Bezos owns The Washington Post.) In San Francisco, a similar effort to tax large businesses for programs to address homelessness and affordable housing passed in November after a heated debate between tech impresarios such as Twitter’s Jack Dorsey and Salesforce’s Marc Benioff.

Microsoft’s announcement was coupled with a pledge from the mayors of nine suburban areas around Seattle to take other steps to address the issues. The company said that it would take years of work to tackle the problems in the area.

“We recognize that Microsoft is in a unique position to put the size of its balance sheet behind this effort,” it said in a statement. “But we believe that every individual and every business, large and small, has a responsibility to contribute.”

Read more:

The world’s oldest person record stood for decades. Then came a Russian conspiracy theory.

Trolling Trump and feeding furloughed workers: How brands are wading into the chaos of the shutdown

Is the tech backlash going askew?