Longtime state legislator Babette Josephs was locked in a tight battle Tuesday with her former campaign treasurer, Brian Sims, who wants to become the first openly gay member of the Pennsylvania House of Representatives.

With 87 percent of precincts counted at midnight, Sims led by 233 votes in the Center City and South Philadelphia 182d district. The Associated Press called the race for Sims, who also claimed victory, though Josephs did not concede publicly.

Josephs, who has held the seat since 1985 and is the senior female member of the House, could not be reached for comment.

"We were the second largest state to never elect an openly gay legislator," Sims, a lawyer active in gay-rights issues, said at the party celebrating his apparent victory at Woody's bar in Center City. "I'm excited to get to work."

With no major party opposition in November, Sims should be headed for Harrisburg if his lead holds.

Sims led his Downingtown High School football team to a state championship in 1996, and was captain of the Bloomsburg University team that went to the Division II National Championship game in 2000. Sims came out to his teammates during the season.

In the neighboring 186th District, Jordan Harris, a former teacher who ran the city's Youth Commission, will take the House seat of his political ally Kenyatta Johnson, who resigned in January to take a seat on City Council.

With 91 percent of the vote tallied, Harris was winning with 76 percent.

Harris handily defeated attorney Damon Roberts, who has twice run for City Council, and public high school teacher Timothy Hannah, who has run for the 186th seat and a congressional seat before.

There is no Republican running in the district, so Harris will be unopposed in the November general election.

Harold James, who lost the seat in the 2008 Democratic primary election to Johnson, won the special election to finish the last six months of Johnson's second two-year term. James, who defeated Republican Barbara Hankinson in a special election Tuesday, said he would be a mentor to Harris in that time.

Both Harris and Johnson came up under the political tutelage of State Sen. Anthony Hardy Williams. Harris will start a new two-year term in 2013. The district represents parts of Southwest Center City, Point Breeze, and other portions of South Philadelphia.

In other races from Tuesday night.

169th District. In Northeast Philadelphia, David Kralle cruised to victory in the GOP primary over opponent John McCann. With all precincts reporting, Kralle had more than double McCann's votes. Kralle will vie to fill the seat vacated by Dennis O'Brien, who was elected to City Council last fall. Kralle was his top aide.

Kralle and Democrat Ed Neilson face off in November.

Neilson defeated Kralle on Tuesday in a special election to fill out the remaining eight months of O'Brien's term in Harrisburg.

172d District. Incumbent Kevin Boyle defeated Daniel Collins and will run against Republican Al Taubenberger (a former mayoral candidate) in November. The Northeast Philadelphia district covers parts of Fox Chase, Rhawnhurst Bustleton, and Burholme.

180th District. Incumbent Democratic State Rep. Angel Cruz was fending off a challenge from retired Police Officer Jonathan Ramos, and appeared headed for victory. With 97 percent of the precincts reporting, Cruz had a clear lead.

Cruz beat Ramos two years ago by just 139 votes. The district represents parts of North Philadelphia, Fairhill, West Kensington, Feltonville and Harrowgate. 

188th District. Incumbent Democrat James Roebuck appeared to win as he held a more than 800-vote lead over challenger Fatimah Muhammad with nearly 92 percent of the precincts counted Tuesday night.

190th District. Incumbent Vanessa Lowery Brown defeated challengers Wanda Logan, Audrey Blackwell-Watson and Lemuel Thornton. She will run unopposed in November for the district representing portions of Overbrook, Strawberry Mansion and Haddington.

192d District. Incumbent Louise Bishop defeated Will Mega handily. She will run unopposed in November to represent the district, which includes parts of Overbrook and Wynnefield.

194th District. Incumbent Pamela Delissio beat challenger Ray Bailey. She will face Republican challenger Linda Bateman in November in the district, which covers Roxborough, Manayunk, and parts of Montgomery County.

195th District. Incumbent Michelle Brownlee defeated challengers Andrew Kleeman and Takeem Morgan. She will run unopposed in the fall for the district, which covers parts of Francisville, Fairmount, Brewerytown, Mantua and Spring Garden.

197th District. The Democratic race for North Philadelphia's 197th District was leaning to J.P. Miranda, who held a solid lead over Jewel Williams, daughter of former state representative and now Philadelphia Sheriff Jewell Williams, with 97 percent of precincts reporting. Miranda previously worked for City Councilman Darrell L. Clarke, State Sen. Shirley Kitchen, and Mayor Nutter.

Democrat Gary Williams won the special election to fill out the remainder of Jewell Williams' term this year, defeating third-party candidate T. Milton Street Sr., brother of the former mayor, and Republican Steve Crum.

198th District. Incumbent Democrat Rosita Youngblood defeated Charisma Presley and Malik Boyd, and will run unopposed in November to represent the district housing parts of Olney, Germantown, Chestnut Hill and North Philadelphia.

201st District. Stephen Kinsey held a large lead over challengers Michael Ellis and Karl Gamble to replace retiring incumbent John Myers. Kinsey, a Democrat, will run unopposed in November to represent the district, which houses parts of East Germantown and Ogontz.

202d District. Incumbent Democrat Mark Cohen defeated Numa St. Louis and will run unopposed in November for the district representing parts of Olney and Northeast Philadelphia.

203d District. Incumbent Democrat Dwight Evans defeated Lamont Thomas and will run unopposed in November for the district representing parts of West Oak Lane, East Oak Lane, Oak Lane and Olney.

In Upper Darby's 163d Legislative District, former corrections officer Sheamus Bonner, 38, had a comfortable lead over Robert Cassidy, 61, in the Democratic primary. The nominee will take on longtime Republican State Rep. Nick Micozzie in November.

In Montgomery County, Madeleine Dean, an English professor and attorney from Jenkintown, secured her seat in the state House early in a special election to fill the seat vacated this year when then-Democratic State Rep. Josh Shapiro resigned to become a Montgomery County commissioner.

Dean now heads to Harrisburg until November, when she will face off once more in the general election against Republican opponent Nicholas Mattiacci, whom she handily defeated Tuesday night in the Democratic-leaning district.