A former California state senator once considered a leading candidate for a statewide office is facing up to 20 years in prison after pleading guilty to a racketeering charge in connection to the Chinese mafia.

Leland Yee — an advocate for government transparency and gun control while in office — acknowledged as part of a plea agreement Wednesday that he accepted bribes for his influence and power and discussed plans to acquire weapons.

He pleaded guilty to one count of conspiracy to engage in racketeering as part of his campaign committees for San Francisco mayor and California secretary of state.

The case against Yee, 66, is connected to a federal probe against Raymond 'Shrimp Boy' Chow, 54, a former gang member and alleged leader of a crime syndicate centered in San Francisco's Chinatown.

Scroll down for video

Former state senator Leland Yee, 66, has entered a plea deal on a racketeering charge he faced for accepting campaign donations from members of the Chinese mafia. Above he is pictured in July last year

The charges against Yee stemmed from his connection to Raymond 'Shrimp Boy' Chow (right), the chairman of a Chinese fraternal society in San Francisco (left)

The racketeering count to which Yee pleaded guilty included wire fraud, bribery, extortion, trafficking in firearms and money laundering, according to KQED.

'He's pleading guilty to a very significant charge,' said Laurie Levenson, a former federal prosecutor who now teaches at Loyola Law School in Los Angeles. 'This is a career ender.'

Yee also faces up to a $250,000 fine.

The FBI arrested Yee and 19 others in March 2014 during a series of raids, one of which targeted a Chinese fraternal organization, the Ghee Kung Tong.

Yee was in his second term as a state senator at the time after serving in the Assembly and as a San Francisco supervisor and school board member, and was running for the California secretary of state's office.

He appeared relaxed as he entered federal court Wednesday in a dark suit and red tie, smiling and talking with people in the audience like a seasoned politician.

Yee left the courthouse without talking to reporters. He is scheduled to be sentenced in October.

Yee, who admitted taking the money to finance debts from a 2011 bid for San Francisco mayor, originally pleaded not guilty to charges including money laundering and racketeering

LELAND YEE: FROM BELOVED LEGISLATOR OF THE YEAR TO ALLEGED ARMS DEALER Leland Yee, Ph.D. is a child psychologist who transitioned into politics. He represented San Francisco and much of San Mateo County in the California state senate. The 66-year-old was a vocal proponent of gun control legislation who was even named legislator of the year by the California Attorneys for Criminal Justice. He's also positioned himself as a proponent of increasing transparency in California government and run a campaign on the platform of campaign finance reform. In addition to charges he offered to introduce agents to arms dealers in exchange for campaign cash, Yee or his employees were charged with accepting $42,800 in cash or campaign contributions from undercover FBI agents. Documents allege he sought to dig himself out of a $70,000 debt incurred during a failed San Francisco mayoral bid in 2011. Yee could have faced a sentence of 125 years in prison if convicted of all the charges against him, but now faces 20 years after pleading guilty to a racketeering charge. Ironic: A 2013 file photo shows Yee (center background) and other lawmakers including LA Mayor Antonio Villaraigosa, left, looking at a pair of semi-automatic rifles as he discusses gun control legislation Advertisement

As part of his plea agreement, Yee acknowledged accepting $11,000 in exchange for setting up a meeting with another state senator, believed to be Senate Minority Leader Bob Huff, about possible interest in marijuana legislation.

He admitted to receiving $10,000 for recommending someone to the Department of Public Health for a grant and $6,800 for providing a certificate on state Senate letterhead honoring the Ghee Kung Tong, the home of the Chinese Freemasons of which Chow is 'dragon head'.

He also acknowledged that he discussed helping an undercover FBI agent buy millions of dollars in automatic weapons from Muslim separatist-linked sources in the Philippines that were intended to be brought to the US through Newark, New Jersey, for distribution.

The deal also included talk of bringing shoulder-fired missiles.

Yee's plea agreement says that the money was used to cover his $70,000 campaign debt from running for San Francisco mayor in 2011

He agreed to forfeit $33,000 from his campaigns.

The former state senator previously pleaded not guilty to bribery, money laundering and other felony charges.

Yee's admitted wrongdoing included trying to broker a deal to buy automatic weapons from the Philppines and providing a certificate for Chow's (right) organization. Above left, an FBI agent during last year's raids

SHRIMP BOY: A FUNNY LITTLE NAME FOR A SERIOUSLY BIG CRIMINAL Raymond 'Shrimp Boy' Chow served more than 20 years in prison for gang activity in the 1980s Raymond 'Shrimp Boy' Chow, 54, was the enforcer for the most feared street gang in San Francisco Chinatown in the 1980s. As his moniker suggests, he's not a tall man, but he used his willingness to get what he wanted with violence to become one of the best known, and terrifying, forces in the Chinese mafia. Things changed when his entire crew turned on him following their arrests and his crime boss fled to Hong Kong, leaving him to take the fall. Shrimp Boy served 11 years of a 25 year sentence in prison for running prostitution rings, smuggling drugs and extracting money from San Francisco business owners in exchange for his mercy. He'd since inserted himself into politics, notes KGO, made a point of reaching out to at-risk youth. 'I want to do something for the kids,' he told KGO in 2012. 'I want to do something for the community. I want to do something for myself.' However, authorities had continued to keep an eye on the ex-con, who was at the time of his arrest last year the chairman of the Chinese freemasons. Agents were seen hauling boxes, bags and other items from the group's San Francisco offices at part of the sting. Chow faces racketeering charges for money laundering and with dealing in stolen property. Advertisement

His plea deal means that the FBI will not be forced to reveal details about its massive investigation that also saw meetings with San Francisco 49ers quarterback Joe Montana and San Francisco Mayor Ed Lee, according to the San Jose Mercury News.

'Today's news turns the page on one of the darker chapters of the Senate's history,' Senate President Pro Tempore Kevin de León said about Yee's plea.

His arrest was the culmination of the FBI's multiyear investigation of Chow, who previously served two decades in prison after becoming a feared gang member in 1980s San Francisco.

The FBI alleges the Ghee Kung Tong association was a racketeering enterprise and that undercover agents laundered $2.6 million in cash from illegal bookmaking through the organization.

Chow has pleaded not guilty to money laundering and other charges.

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.

Twenty-five other were indicted along with Yee last year, after undercover agents laundered $2.6million through Chow's organization. Above, an FBI agent removes evidence from Ghee Kung Tong

The legislator's plea deal may mean that details about the FBI's extensive investigation into Chow never are revealed. Above, a firefighter carries equipment out of the Ghee Kung Tong building

Jackson was also accused of soliciting bribes. He pleaded guilty to the same racketeering charge as Yee on Wednesday and agreed to a sentencing range of six to 10 years.

His son Brandon Jackson and sports agent Marlon Sullivan pleaded guilty to racketeering charges and face up to eight years in prison each.

Yee's troubles were part of a series of legal cases involving Democratic state lawmakers in 2014 that damaged the Legislature's image and led to reforms.

Sen. Ron Calderon was also indicted on federal bribery and corruption charges.

Calderon has pleaded not guilty. Sen. Rod Wright was convicted for lying about living in his district and sentenced to three months in jail.

Yee's senate term ended in November.

The case against Chow continues. He maintains his innocence and is selling 'Free Shrimp Boy' t-shirts.