Two very different election night parties were thrown Tuesday - one for a politician on his way back, another for a politician on his way out.

For State Rep. Dwight Evans, it was time for revelry. In a Germantown banquet hall, more than 150 supporters wearing campaign T-shirts surged to snap selfies with the man who had just unseated an 11-term congressman.

Seven miles to the south, U.S. Rep. Chaka Fattah faced a far grimmer affair. A small group of supporters gathered at the union hall where, two decades ago, he launched his congressional career. They stuck around just long enough to hear him say that career was over.

The scenes that welcomed the men - both long-established names in Philadelphia Democratic circles - mirrored shifts in political fortunes that few would have seen coming just a few years ago.

Evans, 61, is back on top six years after his state House Democratic colleagues relegated him to the back bench, stripping him of the powerful post atop the Appropriations Committee.

And Fattah, 59, who hasn't faced a primary challenger in two decades and who had scant Republican opposition in an overwhelmingly Democratic district, faces a federal racketeering trial in 20 days that threatens to send him to prison.

Fattah on Wednesday declined to answer questions about his future. Instead, his office issued a two-page summary of the programs he has helped create and fund.

"I have spent my career working to better the lives of the people in our community," Fattah said in the summary.

In a separate email, he noted that he has won 32 elections and lost just four since 1979.

The federal corruption investigation, which played out partially in public before the indictment, took a toll on Fattah's reputation and ability to raise money to seek a 12th term in office.

But the seeds that led to his defeat Tuesday were planted a decade ago.

Fattah, who always seemed more comfortable with the minutiae of federal program funding than the retail politics of campaign fundraising, had a plan to run for mayor of Philadelphia in 2007.

He solicited six-figure contributions from a handful of wealthy supporters and planned on asking the courts to overturn the city's new campaign finance limits law if he was challenged.

A local judge threw out the law. But Commonwealth Court overruled that and put the campaign limits back in place.

Fattah, according to his federal indictment last July, then took an illegal $1 million loan from one contributor, Albert Lord, former chief executive officer of Sallie Mae, the student loan financing corporation.

Two former Fattah campaign aides have pleaded guilty in federal court, admitting to concealing the loan and "stealing charitable and federal grant funds" to pay back part of it, according to the indictment.

Fattah is also accused of using a sham sale for a Porsche owned by his wife, former NBC10 news anchor Renee Chenault-Fattah, to cover up a bribe paid by a lobbyist. She went on leave after the indictment and parted ways with the television station in February.

The investigation and indictment sapped his financial resources, forcing Fattah to rely almost exclusively on retail politics - the very thing he tried to avoid in the 2007 mayoral race.

He stumped for votes, criss-crossing the district, which covers parts of Philadelphia and Montgomery County, showing up for events prepped with details about the work he has done on federal programs for education, housing, job training, and health care.

Facing a possible federal prison term, Fattah said his focus remained primarily on the election.

Talking to reporters after court hearings, Fattah frequently pivoted on questions about his federal case, turning them to his record in the House. He played the television cameras, taking advantage of attention to air his accomplishments.

It wasn't enough.

While early returns in Philadelphia showed Fattah with a slight lead Tuesday evening, Evans caught up and then easily won by more than 7 percentage points, 42 percent to 34.5 percent.

Two other Democrats, Lower Merion Township Commissioner Brian Gordon, 55, and lawyer Dan Muroff, 48, finished well behind, Gordon with 13 percent and Muroff with 10 percent.

Fattah watched the results stack up in private with his family. Meanwhile, less than 30 supporters milled about the Center City headquarters of Local 1199C of the National Union of Hospital and Health Care Employees, waiting for the candidate.

Listless smooth jazz played while a buffet of sandwiches went largely untouched.

In 1994, Fattah stood in the same room after defeating U.S. Rep. Lucien Blackwell in the Democratic primary for the Second District.

He told supporters that night: "The gentleman I ran against in this contest tonight, the numbers did not add up for him."

Fattah told supporters Tuesday: "It appears that we will not have the numbers add up in a way that will return me to the Congress."

Fattah, in his speech, referred to Evans as "the gentleman."

215-854-5973@ByChrisBrennan

Staff writer Claudia Vargas contributed to this article.