SACRAMENTO — State Sen. Leland Yee, a child psychologist and veteran lawmaker, was a visible member of the Capitol's Democratic majority who most recently has done much of his work out of the spotlight.

He focused on issues involving mental health, open government and the protection of minors. He was involved in efforts to regulate guns, particularly after the 2012 mass murder of children at a Connecticut elementary school, a tragedy that Yee said touched him.

"As a father," he said then, "I have wept for the parents and families who lost their precious children."

Barred by term limits from remaining in the Senate, he had launched a campaign to become secretary of state, California's top elections officer.

But a federal indictment of the San Francisco lawmaker Wednesday may have doomed that effort, and further hampered Democrats' efforts to regain the Senate supermajority they lost when another senator took a leave of absence to fight federal corruption charges.

It also painted an entirely different picture of a lawmaker now accused of conspiracy to traffic in guns, which carries a maximum of five years in prison.

Yee's personal history is an increasingly common one in today's Legislature, that of an immigrant who finds success in America.

He came to the United States from China at the age of 3. He earned a doctorate in child psychology, was elected to various local offices and the state Assembly and in 2006 became the first Chinese American elected to the California Senate.

His campaigns have been funded with donations from such interests as public employee unions, casino operators, healthcare firms and Asian American businesses.

In the Legislature, Yee sometimes angered leaders by straying from the Democrats' official position on bills. He opposed a ban on the use of plastic bags by grocery stores, for example, as well as a prohibition on the sale of shark fins that he called "an attack on Asian culture."

Although he was assistant president pro tem of the Senate in 2009, in more recent years Yee has been left out of influential panels and leadership posts. Still, his website boasts of having more than 180 bills signed into law.

One of those, a measure to ban the sale of violent video games to minors, was struck down by the U.S. Supreme Court in 2010. In 2012, Yee made headlines with a successful bill allowing juveniles who were sentenced to life without parole to petition for a new sentence of 25 years to life.

Not long after the 65-year-old lawmaker sat grim-faced and manacled in a San Francisco courtroom with 19 other defendants Wednesday, Senate leader Darrell Steinberg (D-Sacramento) demanded that Yee "leave the Senate and leave it now," even though he is, "yes, innocent until proven guilty."

The leader of the Senate's minority Republicans, Robert Huff of Diamond Bar, signaled hours earlier that the GOP would make a campaign issue of the criminal charges now lodged against three Democratic senators.

They include Sen. Roderick Wright, who represents an Inglewood district and has been convicted of perjury and voter fraud, and Sen. Ronald S. Calderon of Montebello, who has been indicted on bribery and money-laundering charges.

"Once again, the Senate has been tarnished by another FBI raid of a senator's Capitol office," Huff said in a statement.

One of Yee's rivals for secretary of state, Sen. Alex Padilla (D-Pacoima), called Wednesday's news "a sad day for government."

Another competitor, Dan Schnur, former chairman of the state Fair Political Practices Commission who has no party affiliation, also weighed in, saying that Yee's arrest was another reminder "of why Californians have so little trust in their elected officials."

Yee has had brushes with the law before.

In 1992, a store security officer in Kona, Hawaii, stopped him after he left the shop with an eight-ounce bottle of Tropical Blend Tan Magnifier oil in a pocket of his shorts, according to the San Francisco Chronicle. Yee told police it was a mistake, but he was booked on suspicion of petty misdemeanor shoplifting, the newspaper reported; the case was later dropped.