A longtime confidant of State Sen. Vincent J. Fumo's testified yesterday that he received more than $500,000 under lucrative Senate contracts while working as Fumo's political hired gun - and submitted false bills to justify his paychecks.

In devastating testimony in Fumo's federal corruption trial, Howard J. Cain said he worked on scores of campaigns at Fumo's direction but concealed the "primary service" he provided. He said that was "campaign operations."

When Assistant U.S. Attorney John J. Pease asked him why he never mentioned his political work on his invoices, Cain had a simple answer: "You couldn't have the state pay for political campaigns."

Once a top political strategist, Cain turned on his old friend this year after the FBI and the IRS discovered that Cain hadn't paid income taxes for years. He pleaded guilty in June to tax evasion and, in an effort to get a break at his own sentencing, agreed to testify against Fumo.

At the start of his testimony yesterday, Cain appeared depressed. He sighed. His shoulders slumped. He spoke in a low monotone.

As the day wore on, he became more relaxed, as he delivered what at times sounded like a master's seminar in what he called "the jungle of Philadelphia politics."

Cain explained how Fumo would dispatch him to do work for candidates as far away as Erie, and that those candidates, in turn, would be indebted to the powerful Philadelphia Democrat.

"It would help him advance his political power," Cain said of Fumo, who sat quietly at the defense table as his once-close ally spent a full day on the witness stand. "It creates political currency. . . . I was the mint."

Cain, 60, is due back on the stand when the trial resumes on Monday. Fumo's lead defense attorney, Dennis J. Cogan, is expected to challenge his credibility and portray him as someone who had no choice but to turn on Fumo in the face of serious tax problems.

Cogan also is expected to argue that, under the generous hourly rate in Cain's state contract, he needed to work only about 10 hours a week on legislative tasks to justify his full payment.

Cain took the stand as the sixth prosecution witness in the trial, now in its third week, before U.S. District Judge Ronald L. Buckwalter.

Fumo, 65, is accused of defrauding the Senate by having employees and contractors, including Cain, do personal or political work on the public's dime.

He also is charged with defrauding a South Philadelphia charity, Citizens' Alliance for Better Neighborhoods, getting free yacht trips from the Independence Seaport Museum, and obstructing the investigation.

While describing his own conduct in unflattering terms, Cain also depicted Fumo's world as a place without boundaries separating the legislative from the political. In testimony often backed up with e-mail evidence from the times in question, Cain said that:

A top Senate computer expert on Fumo's staff was detailed in 2004 to set up the equipment for a "boiler room" devoted to get out the vote for the Democratic presidential nominee John Kerry.

Fumo personally ordered that money from Citizens' Alliance be used to pay for what a 2002 e-mail described as "some covert data entry" to politically damage Ed Rendell. The idea was to identify areas with lots of subsidized housing, and to tie Rendell to that housing during that year's gubernatorial primary.

Fumo's legislative office in South Philadelphia was a beehive of political activity. "When the senator was interested in a campaign, everybody knew it," Cain testified. "Everybody would do whatever he wanted for that campaign."

Under questioning by Pease, Cain described himself as the "behind-the-scenes guy" for a number of candidates - especially for those outside Philadelphia, where it wasn't helpful to be linked to a city politician.

"I was just there because I worked for Sen. Fumo," said Cain. "I made sure I was never out front."

Fumo, he said, would thank him when the candidate won.

"My job was to get people he wanted elected, or keep them in office. And when I did that, it was a good day," Cain told the jury.

Cain said he first began working for Fumo in the mid-1980s and quickly was put on a consulting contract under which his work was paid with public money. At its peak, the contract paid him $88,000 yearly.

His Senate Appropriations contact was by far his main client, Cain testified. "That would be the biggest single steady contract over the years," he said.

For years, Cain never itemized his services. He was finally asked to do so in 2004, after word broke that Fumo was under federal investigation.

Cain said he found it difficult to draft the bills in ways that disguised his real activity.

"I padded the hours and tried to list things that were political, but wouldn't appear political," he said.

Contact staff writer Emilie Lounsberry at 215-854-4828 or elounsberry@phillynews.com.