ALLENTOWN, Pa. (AP) — The Democratic mayor of Pennsylvania's third-largest city defended himself Wednesday against accusations that he sold his office to campaign donors, telling a jury that while he asked business executives for political money, he didn't promise them city contracts in return.

Taking the witness stand at his federal corruption trial, Allentown Mayor Ed Pawlowski denied the government's allegation that he rigged bids to favor law firms and businesses that supported his unsuccessful runs for governor and U.S. Senate.

"I don't do pay-to-play," he said.

Pawlowski, 51, who began a fourth term last month, faces multiple charges, including fraud, bribery, attempted extortion and lying to the FBI. The most serious charges carry a maximum prison term of 20 years each.

On the stand, Pawlowski tried to distance himself from a political consultant who cooperated with the government and secretly recorded conversations with the mayor.

Pawlowski told jurors he was horrified when he learned the consultant, Sam Ruchlewicz, had guaranteed favorable treatment to a real estate developer who'd donated money to his 2015 Senate campaign.

Pawlowski contended Ruchlewicz acted without his knowledge or approval.

The campaign consultant was "out there doing stuff that wasn't right, that wasn't proper, that didn't reflect who I was," Pawlowski told the jury. "This is horrible, this is the type of stuff that people go to jail for. I don't want any part of it."

Ruchlewicz, who testified against Pawlowski, has not been charged with a crime.

Under questioning by his lawyer, the mayor testified about a series of contracts that prosecutors say he rigged to reward campaign donors. Pawlowski insisted there was no quid pro quo, though he allowed that campaign donors might get extra attention from him.

He said he had little involvement in a contract for delinquent tax collection that went to Northeast Revenue, a firm whose executives had given money to his gubernatorial campaign. Pawlowski said his only goal was to improve the city's bottom line.

"Honestly, I could care less" who got the contract, he said. "I wanted a better product."

Allentown's former finance director, who pleaded guilty in the case, testified earlier in the trial that Pawlowski pressured city officials to give the contract to Northeast. Prosecutors say the bidding process was subsequently rigged. The company's executives have not been charged with wrongdoing.

In one tape heard by the jury, Pawlowski told Mike Fleck, his campaign manager and another government cooperator who recorded conversations, to tell Northeast executives to "start being helpful, like really helpful." In a separate conversation, the mayor, unhappy with Northeast's level of financial support, threatened to cancel Northeast's contract and give it back to the city's old vendor.

Pawlowski told the jury that he was simply blowing off steam, noting he was under intense pressure to hit fundraising targets set for him by the Democratic Senatorial Campaign Committee. He said that Northeast had promised to organize a fundraiser for him in a part of the state where he lacked connections with big-dollar donors, but wasn't following through.

"Anybody who has to raise money, you get frustrated after a while," Pawlowski told the jury. But "expressing that to my campaign staff and telling it to a donor are two different things."

The defense sought to use the government tapes to its own advantage.

Pawlowski's lawyer played a June 2015 conversation in which the mayor — unaware he was being recorded — complained to Ruchlewicz about an engineering executive who'd been pressuring him for city work. The executive later pleaded guilty to conspiracy to commit bribery.

"He's got to bid on contracts. He's got to be reasonable. That's not the way we do business. ... I'm not a pay-to-play guy. And if that's the way he wants to do it, then screw him. Then I don't get anything from him," Pawlowski said on the tape.

The mayor was even more explicit after learning that Ruchlewicz had guaranteed city action in a text to real estate developer Ramzi Haddad, who has pleaded guilty to a bribery conspiracy charge.

"If Sam keeps this up," Pawlowski told his campaign manager in a recorded conversation, "we're going to be in jail." The mayor added: "We shouldn't do anything that isn't ethical. ... I don't think we should even come close to crossing the line."

Pawlowski's testimony will resume Thursday, with cross-examination to come.