San Francisco voters passed an initiative that will establish a dedicated funding stream for affordable housing in the city.

Proposition C is the key component of Mayor Ed Lee’s plan to create a local Housing Trust Fund. Once it is implemented, the 30-year program would provide nearly $51 million a year for affordable and middle-income housing.

Elsewhere, a $78.3 million bond measure for affordable housing in Austin, Texas, was on its way to defeat. Houston voters were also deciding on $15 million for affordable housing. And in Rhode Island, voters approved $25 million in bonds for affordable housing.

In San Francisco, officials hope to have about $20 million in the housing fund, beginning in 2013.

Money for the fund would come from three main sources: The portion of the tax levied on hotel stays that went to the city’s defunct Redevelopment Agency, future property tax revenue that would have gone to redevelopment, and $13 million from the city’s main spending account in the first year.

The move comes after the state eliminated about 400 local redevelopment agencies, which provided critical funds for affordable housing.

In Austin, the $78 million Proposition 15, which was estimated to help create 3,500 housing units, looked like it was going to fail on election night. In 2006, city voters had approved $55 million in bond money for affordable housing.

In Houston, about 56 percent of the voters were for Proposition E and 44 percent were against it. The proposition seeks to issue $15 million in affordable housing bonds.