HARRISBURG - A Philadelphia lawyer made history on Tuesday when he was sworn in as the first openly gay lawmaker elected to the Pennsylvania legislature.

Brian Sims, 34, ran unopposed in the November election after ousting longtime Rep. Babette Josephs in the Democratic primary in the Center City district.

"The tide has changed," said Sims, a civil rights advocate who recently stepped down as board president of Equality Pennsylvania, the statewide lesbian and gay advocacy organization. "2012 will go down in history as when being anti-gay puts you in the minority."

By coincidence, Sims will be one of two openly gay lawmakers in the General Assembly this year. In a surprise announcement last month, Rep. Mike Fleck, a sitting Republican lawmaker from Huntingdon County, revealed that he was gay.

Sims said that with two gay members, the legislature would have a more difficult time ignoring gay civil rights issues such as discrimination in the workplace and in housing - the focus of legislation he has already introduced - as well as hate crimes and bullying.

He said he also wants to work on bills to address gun violence, an issue on the minds of Philadelphia lawmakers long before the tragedy in Newtown, Conn. Sims says he recognizes that gun control measures will face resistance in a legislature dominated by rural lawmakers but hopes to find common ground.

"We had more murders last year in Philadelphia than in all of Germany," Sims said. "Some people may have a deer problem. We have a murder problem."

By a quirk of the constitutional calendar, newly elected members of the House and Senate took the oath of office on New Year's Day for the first time in 22 years.

The state constitution mandates that all 203 members of the House and half the Senate (25 members) be sworn in on the first Tuesday in January in odd years. The House members are elected every two years. Elections for state senators who serve four-year terms are staggered, with half the Senate elected every two years.

In addition to Sims, five new Philadelphia representatives - Stephen Kinsey, Stephen McCarter, Jordan Harris, James Clay, and J.P. Miranda, all Democrats - were sworn in.

Three new lawmakers from suburban Philadelphia - Becky Corbin, a Republican from Chester County, along with Mary Jo Daley and Mark Painter, Democrats from Montgomery County - joined the 26 other members of the House freshman class.

The GOP remains in control of the House (111-91) and the Senate (27-24), but Democrats made inroads in the upper chamber, winning three of four vacant seats and narrowing the Republican margin.

Rep. Sam Smith (R., Jefferson) was unanimously reelected speaker of the House.

Among the major issues on the legislative agenda in 2013: the state budget, pension reform, liquor privatization, and transportation funding.