HARRISBURG — Prosecutors called it "a textbook case of public corruption": State Rep. Vanessa Lowery Brown (D., Phila.) was offered envelopes stuffed with cash in exchange for official favors — and pocketed it.

Brown's defense lawyer offered a different take: Law enforcement officials entrapped her — and used a deeply troubled con man to do so.

Those were the sides presented during opening arguments Tuesday before the jury of seven women and five men at Brown's public corruption trial in the Dauphin County Courthouse. The five-term state lawmaker is facing bribery and other charges resulting from a high-profile sting investigation led by the state Attorney General's Office. She is the only defendant in the long-running case who is fighting the charges.

The trial, expected to continue all week, will feature video and audio recordings made by the sting's undercover operative, Tyron B. Ali. Ali, long an elusive figure in the case, is expected to take the stand later in the week.

On Tuesday, First Assistant District Attorney Michael A. Sprow told jurors that Brown accepted a total of $4,000 in 2011 from Ali, who during the investigation posed as a lobbyist and showered her and others with cash and gifts.

Sprow said Brown admitted her guilt before a grand jury that heard evidence in the case, acknowledging that she knew what she did was improper.

"This is a textbook case of public corruption," Sprow told jurors, later adding: "It was clear that in conversations that Mr. Ali had with the defendant that this relationship was a two-way street.

"He wasn't just giving her money to give her money for no reason." Sprow said. "He made it clear that he expected her to support his clients' causes. And the two of them would discuss specific pieces of legislation, and Mr. Ali would tell her how she needed to vote on those particular issues … and the defendant agreed to do that."

Defense lawyer Patrick A. Casey painted a scathing picture of Ali — whom he called "a con man" — and said the government deployed him to lure Brown to do something she did not intend to do.

Ali, he told jurors, had been charged in a massive fraud case before agreeing to wear a recording device and cooperate with state prosecutors, and was hell-bent on getting "a scalp on the wall" to fulfill his end of the bargain.

"This is the person who the government signed up to try to work undercover," said Casey, a Scranton attorney.

Casey said that Ali offered Brown cash at their first meeting — and that she turned it down, telling him that she has operated "by the book from the start." At that point, Casey argued, the government should have walked away.

"The government offered Vanessa Lowery Brown the opportunity to commit a crime" during that first meeting, said Casey. "It should have been stopped when she said no and returned that money."

The sting case dates to 2010, when Ali, hoping to win favorable treatment after his arrest in an unrelated fraud case, agreed to wear a wire for the state Attorney General's Office and tape public officials as he made his rounds in Philadelphia and Harrisburg. The investigation was run by former state prosecutor Frank Fina, who had carved out a niche pursuing big public-corruption cases.

In March 2014, the Inquirer reported that former Attorney General Kathleen G. Kane secretly shut down the investigation after taking office in 2013. The sting case was resurrected by former Philadelphia District Attorney Seth Williams, who filed charges against Brown and five others in late 2014 and early 2015.

Five have pleaded guilty or no contest and their cases have been closed. Of those, three were sitting Democratic House members from Philadelphia who resigned from office as part of pleas that allowed them to keep their government pensions.

Brown is running unopposed for reelection next month.