A federal judge sentenced former California state senator Leland Yee on Wednesday to five years in prison after he acknowledged accepting thousands of dollars in bribes and discussing helping an undercover FBI agent buy automatic weapons from the Philippines.

Prosecutors had recommended that Senior District Court Judge Charles Breyer impose an eight-year sentence, saying that would reflect the extent of Yee's crimes.

Yee's attorneys had called for no more than five years and three months behind bars, saying Yee had a history of public service and his wife was ill.

"I don't feel I should be lenient," Breyer said during the hearing. "The crimes that you committed have resulted in essentially an attack on democratic institutions."

Yee, 67, is a long-time politician who also served in the state Assembly and on the San Francisco Board of Supervisors.

He pleaded guilty in July to one count of conspiracy to engage in racketeering. The charge was filed as part of an organized crime investigation in San Francisco's Chinatown that led to charges against more than two dozen people.

The probe also snared Raymond "Shrimp Boy" Chow, a flamboyant leader of a Chinese fraternal organization -- the Ghee Kung Tong.

Federal agents say one of Chow's associates was Keith Jackson, a former San Francisco school board president and well-known political consultant who raised money for Yee's unsuccessful mayoral run in 2011 and his bid for secretary of state.

Yee was trying to pay off the debt from his mayoral campaign with the money he solicited, prosecutors said.

Jackson led authorities to Yee and pleaded guilty to a racketeering charge. He was also expected to be sentenced Wednesday.

Yee has remained free while awaiting sentencing. He acknowledged accepting $11,000 in exchange for setting up a meeting with another state senator, $10,000 for recommending someone for a grant, and $6,800 for providing a certificate on California State Senate letterhead honoring the Ghee Kung Tong.

He also acknowledged that he discussed helping an undercover FBI agent buy automatic weapons from the Philippines that were intended to be brought to the U.S. for distribution.

Prosecutors say Chow and some other members of the fraternal group engaged in drug trafficking, money laundering and the sale of stolen cigarettes and top-shelf liquors.

The case against Chow was largely the work of an undercover FBI agent who posed for years as a foul-mouthed East Coast businessman with mafia ties.