State Rep. Vanessa Lowery Brown's four-year fight to clear her name against bribery charges failed Wednesday when a jury convicted her on all counts.

Brown, 52, a Democrat who has represented portions of West Philadelphia for nearly a decade, was the last defendant in the ambitious and controversial sting investigation launched by state prosecutors nearly a decade ago but secretly killed by then-Attorney General Kathleen G. Kane. The guilty verdict represented the most dramatic repudiation yet of Kane's criticism of the sting, which she had contended could not produce winnable cases in court.

After four hours of deliberation, the jury in Harrisburg found Brown guilty of seven charges — five felony counts of violating the state conflict-of-interest law, a felony count of accepting $4,000 in bribes, and a misdemeanor count of failing to report the payments on her financial-disclosure form.

After the sting cases were resurrected by Philadelphia's district attorney, five other defendants — four former state lawmakers and a Traffic Court judge, all Philadelphia Democrats — pleaded guilty or no contest to sting-related charges.

While the others, with the exception of the judge, struck deals to keep their government pensions, Brown will lose hers as a consequence of her conviction. Under the law, Brown, running unopposed in next month's election, will be barred from her House post upon her sentencing. The others resigned as part of their deals but were spared any time behind bars.

Through a circuitous path, the sting probe led to Kane's political downfall and conviction on criminal charges.  Outraged when the Inquirer broke the news in 2014 of her decision to shut down the sting the previous year, Kane leaked confidential information to the media in a bid to embarrass a former state prosecutor she blamed for the Inquirer report.  She was later found to have lied to a grand jury investigating her leak and was sentenced to serve at least 10 months in a county jail.  Kane, the first woman and first Democrat to be elected state attorney general, is free pending appeals.

Brown long ago confessed she had taken money in the undercover sting; she had little choice but to do so since she was video-recorded pocketing a total of $4,000 in five payments, at one point looking at $2,000 in cash in her Harrisburg office and declaring, "Ooh, good looking! … Thank you twice."

Her defense fought a protracted battle on her behalf anyway.  Her team — lawyers Patrick Casey, John Dempsey, and Erik Anderson — argued that the sting had unfairly targeted Brown and the others as African Americans and Democrats. After the judge rejected those arguments, the defense contended that Brown had been illegally entrapped by a seductive, manipulative and "lethal" undercover agent, Tyron B. Ali.

Prosecutors Michael Sprow and Ryan Shovlin said Brown had only herself to blame. They said she pushed Ali for money and plotted with him about ways to hide the payments.

"It's the correct outcome and it's long overdue," Sprow said after the verdict came in. "They rolled the dice in arguing entrapment in a situation where it didn't apply. And the jury saw through that defense."

As for Kane, Sprow said, "Obviously, she was wrong. We presented the case in court, and it was a strong case. Everything about her assessment of this case was wrong."

Kane did not immediately return a call seeking comment.

In 2009, Ali agreed to become an undercover informant to win leniency in his own criminal case. He had been arrested on charges of a massive fraud, siphoning off $430,000 in state money from a program to provide meals to low-income children and seniors in North Philadelphia. Cooperation paid off for Ali. Other prosecutors eventually dropped all charges against him and asserted that the financial loss was far less.

Ali, a registered lobbyist, moved in political circles.  From 2010 to 2012, under the guidance of former top prosecutor Frank Fina and case agent Claude Thomas, Ali made 113 secret tapes and videos of state lawmakers and others — at times video-recording them with a lens placed in his glasses. Without any public announcement — and without even telling the state Ethics Commission that lawmakers had accepted money without disclosing it on required forms — Kane aborted the investigation. The fraud inquiry involving Ali was kept secret under court seal.

When the Inquirer later revealed her decision, Kane criticized the investigation essentially on the grounds raised unsuccessfully by Brown's defense lawyers at trial.  She said the case was tainted by racial targeting and would not lead to a win in court.

After the case became public then-Philadelphia District Attorney Seth Williams rejected that criticism, harshly assailed Kane and adopted the case. In time, former State Reps. Michelle Brownlee, Harold James, and Ronald Waters and former Traffic Court President Judge Thomasine Tynes all pleaded guilty to crimes related to the sting.  State Rep. Louis Williams Bishop pleaded no contest. The case against Brown, filed in 2014, was handed off to the Dauphin County District Attorney's Office for prosecution.

Brown originally pleaded guilty as well, even acknowledging she knew she was breaking the law. "I am sorry. I never wanted to be in this position," Brown testified before the grand jury. "But now that I look back, it was the wrong thing. It was wrong. I accept full responsibility for what I've done."