HARRISBURG - Tyron Ali, the undercover operative in an investigation that led to the arrests of six Philadelphia Democrats, testified Monday that no one had instructed him to target African Americans as he secretly captured on tape elected officials taking money or gifts.

Ali, making his first appearance in a courtroom since his subterfuge led to the arrest of the six officials, also calmly rejected attempts by State Rep. Vanessa Lowery Brown's lawyer to suggest that he had romantically manipulated her into taking money.

Brown, whose district includes parts of North and West Philadelphia, is the last defendant to maintain her innocence. The other five - four former state representatives and a former Traffic Court judge - have admitted accepting money or gifts and pleaded guilty to misconduct in office.

Though none was sentenced to prison, those still in office when charged had to resign.

Brown, 49, does not dispute that she pocketed $4,000 in cash from Ali, transactions captured in secretly taped transactions. But she has argued that she was targeted by prosecutors because she is black. She also has contended that Ali entrapped her by misleading her into believing they were dating.

Ali, 42, dressed in a black pinstripe suit with a three-point pocket square, kept his answers short and non-argumentative. He gave the defense barely an inch.

When Brown's lawyer, Patrick A. Casey, asked Ali whether he was instructed to target African American lawmakers and Democrats, Ali replied: "I was not."

Moreover, prosecutors Mark Gilson and Brad Bender said that while Ali had secretly taped conversations with about 60 suspects, half of them white, the six defendants were the only ones to pocket cash and fail to report the money as required on public-disclosure forms. There was no selective prosecution, Gilson and Bender said.

In a separate line of attack, Casey cited phone records documenting more than 200 calls between Brown and Ali to suggest that Brown was a vulnerable woman entrapped by the operative. Ali said that was not so, adding that he and Brown had not been in either an emotional or a sexual relationship.

They spoke not of love, he said, but of money.

"Rep. Brown constantly talked about her financial problems," he said.

In her conversations with Ali, an anxious Brown said she had only $500 in her campaign war chest, though more experienced politicians had advised her she needed $100,000 to scare off any primary challenger.

Moreover, she said, she was still deep in a hole dug in 2008 when she first won election. That year, she won an upset victory after proving that the incumbent, Thomas Blackwell, from a powerful West Philadelphia political family, had relied on forged signatures on his nominating petitions. While that won her the seat, she ended up with a $30,000 bill from the Cozen O'Connor law firm, which had helped proved the fraud.

During meals at the Palm and McCormick & Schmick's, Ali presented himself as a man with the answers, falsely telling her he was affiliated with a $6 million political action fund. While he was indeed a registered lobbyist, what Brown and the others did not know was that Ali had agreed to go undercover and wear a wire to win leniency in his own pending theft case. He ended up beating all charges in that case.

To make his case for entrapment, Casey noted that at one point in 2011, Brown rejected an offer of cash from Ali, telling him, "I have been by the book all the way. . . . It's just not worth it."

Gilson, of the Philadelphia District Attorney's Office, said that was only part of the story. He emphasized that Ali had responded to her reluctance to accept cash by saying, "I agree with you 100 percent." Gilson said those were hardly words of entrapment.

But two weeks after that exchange, Gilson said, Brown asked if Ali's offer of cash had "expired." In the end, Brown accepted $4,000 from Ali in five payments over four months in 2011.

Dauphin County Judge Scott Evans issued no final rulings Monday, instead setting May 5 as the date for more testimony.

He did reject motions to block future testimony from Kevin Wevodau, a senior agent in the office of Attorney General Kathleen G. Kane; and from Linda Dale Hoffa, a former top aide to Kane.

Kane inherited the undercover sting operation when she took office in 2013, but secretly shut it down without bringing charges. After the Inquirer broke the news of her decision in a story published in 2014, Kane condemned the investigation, citing 2014 memos from Wevodau and Hoffa that raised questions about whether there had been racial targeting in the case.

On Monday, lawyers for Wevodau and Hoffa unsuccessfully asked Evans to bar the two as witnesses. Hoffa's lawyer, Howard Bruce Klein, called Hoffa's memo, highly touted by Kane in 2014, "nothing more than a collection of hearsay."

Nonetheless, Wevodau and Hoffa are expected to be called as witnesses, along with Claude Thomas, a former agent in the Attorney General's Office who supervised Ali when he was undercover. Like Ali, Thomas has vigorously disputed that race played any role in the investigation.