SAN FRANCISCO -- City officials introduced a bill Tuesday aimed at closing a loophole that gives banks a tax break when foreclosing on a home.

The Foreclosure Fairness Ordinance, co-sponsored by virtually every progressives on the Board of Supervisors, would eliminate a provision in the tax code exempting lenders foreclosing on a home from paying the real estate transfer tax normally required when a property changes hands.

"There's something rotten in Denmark, rather San Francisco, when it comes to the high rate of foreclosures in the city," Supervisor John Avalos said at a press conference announcing the legislation. Avalos, who introduced the bill at the request of San Francisco Assessor-Recorder Phil Ting, insisted the measure is less about raising revenue than about keeping people in their homes.

During years with low foreclosure rates (like 2005), the bill would only generate a few hundred thousand dollars. But in years that see a high volume of foreclosures (like 2011), San Francisco could raise an additional $8 million.

Avalos told the story about a medical emergency that pushed him to the brink of losing his home to foreclosure. With the help of an outside group, he was able to secure a loan modification and keep the property. "It definitely helped that I was an elected official," he said, "but I want everyone to have the same opportunity I had."

The measure's backers hope eliminating the exemption would give banks a financial incentive to pursue loan modifications instead of foreclosures.

"I've been working on this issue for seven years," said Ting, who became a national figure after releasing a report revealing that 84 percent of foreclosures in San Francisco were, in some way, executed illegally. "Everybody loses when you have a foreclosure--the homeowner, the bank and the city."

"This is not a symbolic gesture," added Supervisor Malia Cohen, whose historically African American district of the Bayview has been especially hard-hit. "This is a way for the city to step up where banks have failed us."

This bill isn't the first time the Board of Supervisors has gone on record opposing the wave of foreclosures that hit the city following the collapse of the housing bubble.

In April, officials unanimously passed a non-binding resolution calling for a moratorium on foreclosures until additional homeowner protections are enacted.

Many on the Board are hoping those protections, which range from prohibiting the much-loathed practice of dual-tracking to making it easier to prosecute against financial crimes, come in the form of the California's passing the Homeowners Bill of Rights proposed by state Attorney General Kamala Harris.

The legislature has already passed two of Harris's six bills and is currently waiting to hear the other four.

Since California law requires voters to approve all local tax measures, once this initiative passes the Board of Supervisors, it will then appear on the November ballot.

Full Disclosure: The author was briefly an unpaid intern on Kamala Harris 2003 campaign for San Francisco District Attorney