Prosecutors alleged that Gonzales and aide Joe Guerra brokered a secret backroom deal with Norcal Waste Systems Inc. that caused taxpayers in the country's 10th-largest city to fork out $11.25 million (euro8.43 million) more than they should have for garbage services.

In a ruling filed Monday and released publicly Tuesday, Superior Court Judge John Herlihy ruled that while Gonzales and Guerra improperly concealed their dealings with Norcal, he was required to throw out the seven-count indictment because of prosecutors' faulty directions to the grand jurors and their mistaken interpretations of the law.

Gonzales, who left office last fall because of term limits, had been charged with six felonies, including conspiracy, bribery, misappropriating public funds and falsifying records. He faced up to eight years in prison if convicted.

Charges were also dropped against Guerra and Norcal, who were indicted for allegedly conspiring to defraud the public and misuse public funds.

Supervising Deputy District Attorney Julius Finkelstein said his office would need to study the ruling before deciding whether to appeal or convene a new grand jury.

Prosecutors alleged Gonzales pressured Norcal into hiring the Teamsters - instead of a lower-paid union - to staff a recycling plant in October 2000. They said the mayor secretly agreed to help the San Francisco-based trash contractor recoup the extra labor expenses.

The deal that Gonzales and Guerra brokered cost taxpayers $11.25 million (euro8.43 million) more than they would have had to pay another contractor, prosecutors alleged.

Some legal experts questioned the bribery charge because Gonzales did not receive any money as a result of the deal, but prosecutors say he won political favor from the union.

In dismissing the charge Herlihy tartly chastised prosecutors for their interpretation of the statute.

If the court were to accept the theory they set forth, "then almost any effort by a public official to solve a problem of a constituent could then be regarded as a potential bribe, provided that the constituent continues to politically support the public official," Herlihy wrote. "This is not bribery. This is politics."

In his ruling issued Monday, Herlihy discussed the appearance of impropriety surrounding the mayor's actions.

"There is no question that Norcal, defendant Guerra and defendant Gonzales were delinquent in their responsibility to be open and to fully disclose their knowledge, actions and policies," he wrote.

Herlihy said that even without the mayor's involvement in the Norcal deal, the evidence showed that the city would likely still have approved the amendment that added the $11.25 million (euro8.43 million) in labor costs to the garbage contract.

More than 5.8 million people voted for Nicholas Maduro at the presidential election in Venezuela. This is more than a quarter of registered voters. Why did those people vote for the man, who, as Western media write, took Venezuela to the brink of collapse?