Former Gov. Ed Rendell on Wednesday decried what he called "cynical" and "overreaching" prosecution in U.S. Rep. Chaka Fattah's federal corruption trial, moments after testifying as a defense witness for a friend, fund-raiser, and former deputy mayor who is also charged in the case.

Speaking to reporters outside the federal courthouse, Rendell accused Justice Department lawyers of too often casting innocent friendships and political deal-making in a sinister light. He said prosecutors had twisted the truth in an effort to convict Herbert Vederman, his former deputy, who is accused of paying bribes to Fattah.

"Federal prosecutors don't understand the political process," he said. "They think everything is done for ulterior motives. They're very cynical. We're not all bad. We're not all evil."

The broadside, delivered on the day the defense rested its case, was remarkable not only for its intensity but also for the background of the man offering the criticism. Rendell served two terms as Philadelphia's district attorney. His wife is a retired federal appellate judge.

Still, he recently has testified as a defense witness in a number of high-profile corruption trials, including those of former State Sen. Vincent Fumo and, last year, Fattah's son Chaka "Chip" Jr. in an unrelated bank and tax fraud case. Both were convicted.

But unlike those trials, Rendell said, he leaped at the chance to testify for Vederman, whom he called a "fine human being," generous with friends and community.

As for Fattah, the ex-governor said only: "If the allegations against the congressman are proven, he should be found guilty and go to jail. They're serious charges."

Although Rendell saved his most pointed remarks until after his stint on the witness stand, he showed flashes of prickliness from the start.

Asked by Assistant U.S. Attorney Eric Gibson whether he was aware that lying on a mortgage application - one of Fattah's alleged misdeeds - is a federal crime, Rendell shot back, "I think these days it's a federal crime to do almost anything."

The former governor came across as affable and self-deprecating as he deployed on jurors the skills of political seduction that served him well during his 25 years in public office.

Ruminating on his own career, he drifted into melancholy while discussing defeats such as his 1986 loss in the Democratic gubernatorial primary - the race through which, he said, he first met Vederman.

"Losing is a very hard thing," he said. "You put your heart and soul into it, and then all of a sudden it's over. No more crowds. No more cheering."

Vederman's lawyers hoped that Rendell could puncture a narrative that the government has presented for weeks.

Prosecutors allege that Vederman bribed Fattah over a period of years to buy support for his bid to land an ambassadorship. In exchange, the congressman allegedly lobbied senators, White House staffers, and even President Obama on Vederman's behalf.

But defense lawyers contend that what prosecutors have labeled as bribes - cash payments to the congressman's children, college tuition for Fattah's South African au pair - were nothing more than gifts exchanged between men who shared a long friendship.

"People think that people who run for office don't have friends, that we do everything for some cynical purpose," Rendell told jurors Wednesday. "But of my 10 best friends, five are people I never knew before entering politics. I would do anything for them."

Like Fattah, Rendell said that he believed Vederman was extremely qualified for the job of ambassador and that he felt so strongly about it, he touted him to two Democratic presidents.

During the Clinton administration, Rendell pushed the president's confidant - Terry McAuliffe, now governor of Virginia - on Vederman's behalf.

Rendell joined Fattah's efforts for Vederman starting in 2009, to press U.S. Sen. Robert P. Casey Jr. and Obama administration officials.

When it came to other alleged bribes, Rendell said he was certain that authorities had drawn the wrong conclusions - especially concerning Vederman's purchase of a Porsche owned by Fattah's wife, former NBC10 news anchor Renee Chenault-Fattah.

Prosecutors say the sale was faked to cover an $18,000 payment Vederman gave Fattah in 2012. The vehicle remained in the Fattahs' East Falls garage for years.

But as he understood it, Rendell said, Vederman left it with Chenault-Fattah after the sale because he had no need for a vehicle at the time.

"It was still his car," he said. "If I was going through a midlife crisis - or a senior citizen crisis - and wanted a Porsche, I believe he would have given it to me."

Prosecutors, in a barbed cross-examination, sought to deflate Rendell's unqualified endorsement and show that Fattah repeatedly turned to friends like Vederman to bail him out of his family's financial scrapes.

Citing money Vederman had given Fattah's children while seeking their father's support, Gibson asked whether Rendell had ever accepted payments under similar circumstances.

Rendell said he hadn't, but was sure Vederman would have given freely if he had asked, adding in an aside to Gibson: "I hope you have friends like that."

"I appreciate your concern for my welfare," the prosecutor responded. "I wasn't aware that you had any."

The former governor quipped back: "Not much."

The trial is expected to resume Monday with closing arguments from both sides.

jroebuck@phillynews.com215-854-2608 @jeremyrroebuck