HARRISBURG — Nearly four years after being caught in a high-profile corruption sting, Democratic State Rep. Vanessa Brown is scheduled to go on trial Monday on charges that she abused her office by accepting cash-stuffed envelopes in return for official favors.

It will be a closely watched case. Brown, 52, who represents portions of West Philadelphia and is running unopposed in next month's election, is the last remaining defendant in the ambitious investigation was launched eight years ago by the state attorney general's office.

The investigation became the catalyst for a destructive series of clashes among law enforcement officials in Pennsylvania. It shook the state's legal and political circles, and culminated in criminal charges — and a conviction — against the state's top law enforcement officer.

Brown's trial is expected to feature more than a dozen secret recordings and the likely return to the witness stand of the sting's undercover informant, Tyron B. Ali. During the investigation, Ali posed as a lobbyist and was deployed to the Capitol to shower legislators with cash and gifts. Brown is accused of taking $4,000 in cash from him.

Her lawyers are expected to argue that the case was built on a flawed investigation that relied on a mercurial and untrustworthy operative.

Prosecutors are poised to counter that the Democratic legislator's own words on the recordings demonstrate that she was willing to sell her office for cash. They are also expected to introduce testimony she gave before the grand jury that heard evidence in the case, in which they say she admitted her guilt.

Brown, who faces charges of bribery, conspiracy and conflict of interest, could not be reached for comment last week. Her lawyer, Patrick Casey, did not return a call.

She is the only defendant to fight the case, which resulted in pleas of guilty or no contest from four other onetime state lawmakers and a former traffic-court judge in Philadelphia.

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 Kane secretly shut down the investigation after taking office in 2013. The revelation set off a nasty and deeply personal fight between Kane and Fina that lasted years and ended with criminal charges against Kane, a Democrat. She was convicted in late 2016 of leaking grand jury information in an effort to smear Fina.

The sting case was resurrected by former city District Attorney Seth Williams, who charged 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.

State law allows Brown and other elected officials accused of crimes to remain in office through trial. If convicted, they are required only to resign on the day of sentencing.

In all, Brown is accused of getting the cash from Ali in five installments.

In one instance, she accepted $2,000 from Ali while in her Harrisburg office. She looked at the money, and declared: "Ooh, good looking! … Thank you twice."

She initially agreed to plead guilty in the case, even providing testimony before the grand jury in Philadelphia during which she admitted she had taken the money and acknowledged that it was wrong, according to court documents.

"I am sorry. I never wanted to be in this position," Brown testified before the grand jury. "… You can't survive up here if you don't raise the money. The pressure is too much. … But now that I look back, it was the wrong thing. It was wrong. I accept full responsibility for what I've done."

In the summer of 2015, on the day she was expected to enter a guilty plea in court, she changed her mind.

Her trial has been rescheduled more than a dozen times since, as her lawyers have raised a long list of legal issues, including the contention that she and other defendants in the case had been targeted because of their political affiliation and because they were African American. But a judge dismissed the argument.