HAYWARD — A long-vacant 11-story building at the north end of town that once housed Hayward City Hall will return back to city ownership in an effort to clean up the eyesore that has attracted vagrants, litter and graffiti.

The City Council has unanimously approved purchasing what’s known as the City Center Tower at 22300 Foothill Blvd. for $5.2 million in cash, plus $100,000 in fees to complete the transaction.

The building, which was closed because it did not meet seismic standards, has been vacant for more 20 years.

The building sits between two city-owned parcels and is visible from much of Hayward.

The tallest building in the city, it was once slated to be converted into condominiums and was briefly renamed Centennial Tower. But the building has deteriorated over the years, with many of its windows smashed or boarded up.

Just what the city might do with the property remains unclear.

Deputy City Manager Jennifer Ott told the council June 4 that the building may be put back to public use, or could be offered for sale.

The site is next to other two city-owned properties, Ott noted.

“Its acquisition provides a unique opportunity to preserve it for future development to help revitalize downtown,” she said.

Kim Huggett, president of the Hayward Chamber of Commerce, reminded the council that the building was set for demolition in September 2010.

Huggett said the property is “one of our most important catalyst sites” for spurring redevelopment.

Mayor Barbara Halliday described the move by the city to take back ownership of as “a very enormous step.”

“It’s a definite step forward,” the mayor said.

The site’s owner, 37 Hayward LLC, offered a proposal for the city to take possession of it last month, Ott said.

The building was Hayward’s City Hall from 1969 to 1998, when the city sold it for $1.5 million to a developer, who in turn sold it to another developer.

Some $2 million for the purchase price for the deal approved Tuesday will come from the city’s general fund. The remainder of the money will come from money the city is receiving from William Lyon Homes, which is building 472 apartments and townhouses in South Hayward.

Under the deal, the current property owner will pay all back taxes, while the city will waive all code enforcement liens.