U.S. Rep. Patrick Murphy had just left the Flyers game Saturday when his cell phone rang in the parking lot of the Wells Fargo Center.

"Patrick," the voice on the phone said, "this is Barack."

President Obama was calling to congratulate Murphy on the Senate vote repealing the U.S. military's "don't ask, don't tell" policy, ending a 17-year battle over the role of gays and lesbians in the military.

"Today, we finally closed the books on the discriminatory 'don't ask, don't tell' policy that hurt our national security and ran counter to our national values," Murphy said.

The Bucks County Democrat, who lost his bid for reelection in November, will be at the White House this week, when Obama is expected to sign the bill into law.

An Iraq war veteran who led the charge to strike down "don't ask, don't tell," Murphy said its demise aligned national policy with soldiers' battlefield concerns.

"When I served in Iraq, the men I served with didn't care who you were writing home to," Murphy said. "They cared how you handled your assault rifle. They cared about whether you could kick down a door and whether you could do your job so you could all come home alive."

Just a few weeks ago, efforts to overturn the policy, enacted during President Bill Clinton's administration, appeared dead.

The bill faced resistance from prominent leaders, including Vietnam veteran and former Republican presidential nominee Sen. John McCain of Arizona, who said the change could damage the sense of cohesion essential to military success and safety.

Some military commanders also argued that wartime was a bad time to make such a sweeping change.

Murphy, however, said people who opposed desegregating military units during the Korean War had made the same arguments.

He also said that ferreting out gays and lesbians only hurt the war effort. "Don't ask, don't tell" led to the discharge of 13,500 gay and lesbian service members since the 1993 law went into effect.

"Now is not the time to be having hearings on whether someone is gay or straight," Murphy said. "We should be focusing on finding Osama bin Laden."

A push by Democrats to repeal the policy before Republicans take control of the House of Representatives in January propelled the bill's passage.

After the House passed the measure, 250-175, on Wednesday, Sen. Joseph Lieberman, the Connecticut independent, rallied support in the Senate, where the bill passed Saturday by a 65-31 vote, including support from eight Republicans.

Murphy said he spent Friday in the Senate with Lieberman, rounding up votes.

"We didn't give up," Murphy said. "We didn't stop fighting."

Other area Democrats joined him in hailing the bill's passage.

"Any qualified American willing to risk his or her life for their country should be permitted to serve free of discriminatory treatment and should not have to lie in order to serve their country," said U.S. Sen. Bob Casey (D., Pa.).

Rep. Chakah Fattah (D., Pa.) called the vote "a triumph not just for gay men, lesbians, and members of the lesbian, gay, bisexual, and transgendered community, but for all Americans who love liberty, freedom, and inclusion."

Principle and personal experience motivated Murphy, who served in the Army from 1996 through 2004.

"As a policy-maker you have to listen to both sides of the argument and do what you think is best for the country," he said.

He remembered getting a letter from a commander in Afghanistan who described comforting soldiers when they got bad news about a divorce or other problem. Often, the commander sent them to the military chaplain for help.

But recently, the commander's boyfriend had broken up with him, he told Murphy.

"I can't walk into the chaplain's office and talk to him, because I'm gay," the commander continued, "so I'm sitting here cradling my pistol thinking about blowing my brains out."

The commander then told Murphy the knowledge that another veteran was fighting for him had helped him not give in to despair.

Contact staff writer Miriam Hill at 215-854-5520 or hillmb@phillynews.com.