The state legislature last night passed a gun-control bill advocated by Philadelphia lawmakers, a notable feat in a state so strong on the right to bear arms and so hostile to the city's efforts to regulate them.

The Senate passed the legislation, 50-0, following overwhelming passage in the House last week.

The two measures in the bill, called minor by gun-control supporters, were nonetheless hailed as an important step in a new working relationship between the National Rifle Association and urban lawmakers.

One part of the bill would compel police departments to trace all illegal firearms confiscated from those under the age of 21 and report the guns to a state-police-run registry. The other would expand the definition of firearm under state law to include long-guns such as rifles and shotguns, providing more uniform application of state law.

The NRA backed the bills, saying the tracing requirement would help to fight crime.

"We're elated," said Rep. Thaddeus Kirkland (D., Delaware) chairman of the Legislative Black Caucus, which had threatened to hold up the budget process if no progress was made on gun-control issues.

The caucus negotiated the NRA's support before presenting the bills and has scheduled further talks with the group throughout the summer.

"I honestly believe it will help," Kirkland said. Kirkland said Gov. Rendell, a gun-control supporter, was expected to sign the bills.

After a special session on crime and violence last fall that saw a dozen gun measures trounced in non-binding votes, Philadelphia lawmakers had vowed to seek legislation, including one-gun-a-month purchase restrictions, that might help stem the city's frightening epidemic of violence. Last week, two city council members sued the legislature, seeking to enforce the city's own gun laws. The city's 2007 homicide total hit 221 yesterday.

"It's a new day in Harrisburg, but we still have a long way to go," said Rep. Dwight Evans (D., Phila.), who was the driving force behind the special session.

He said Philadelphia and other urban lawmakers will be working with gun rights supporters in the legislature and the NRA to come up with additional legislation for consideration in the fall.

Diane Edbril, executive director of CeaseFire PA, an anti-gun-violence organization, warned that the measure could become just another unfunded mandate if Harrisburg doesn't offer undermanned police departments the resources to track every gun connected to a minor.

But she also said it was a positive sign. "We're very encouraged," Edbril said.

Since 1994, when the Legislature passed a law forbidding municipalities from passing their own gun laws, only one bill backed by gun-control advocates has become law - the 2005 law enabling judges to confiscate weapons from those subject to a protection from abuse order.

Mayor Street's spokesman, Joe Grace, called the passage of the bills "a beginning."

"We renew our call on the General Assembly to pass stronger gun laws for the Commonwealth of Pennsylvania. Gun violence is a statewide problem requiring a statewide solution," Grace said.