HARRISBURG — Chester County businessman Richard Ireland may be the one on trial for attempted bribery, but it was the federal government's star witness, ex-state Treasurer Rob McCord, who was on the hot seat Monday.

And it was a federal prosecutor who put him there.

Capping his third  and last  day on the stand, McCord, 58, a Democrat, was pushed under questioning by Assistant U.S. Attorney Michael A. Consiglio to acknowledge that he had engaged in quid pro quos — giving something in return for something — during his campaigns for treasurer and governor.

One of those alleged quid pro quos was orchestrated in late 2013 by John H. Estey, the onetime chief of staff to former Democratic Gov. Ed Rendell, according to testimony Monday. Unbeknownst to McCord at the time, Estey was cooperating with federal authorities after being caught in a federal corruption sting, and was surreptitiously recording his conversations.

Estey, McCord said, was ostensibly helping him raise campaign money from a businessman, whom he did not identify. In return for the donation, McCord said, he agreed to help that businessman's son get Treasury contracts, among other official favors.

"Did you engage in a quid pro quo with this individual?" Consiglio asked.

"Yes," McCord responded.

Consiglio's at-times combative questioning of McCord came as a surprise as Ireland's pay-to-play trial before Judge John E. Jones III entered its second week. McCord's testimony is critical to the government's case against Ireland, 80, who is accused of bribery and other crimes.

Prosecutors are alleging that Ireland attempted to bribe McCord through campaign donations, as well as a job in the private sector, in exchange for McCord's help in landing multimillion-dollar state contracts.

Ireland's lawyer, Reid H. Weingarten, has argued that his client's dealings with McCord were always legal and part of the normal course of doing business.

McCord cooperated with federal authorities and secretly recorded his conversations with Ireland after he was caught trying to shake down campaign donors during his unsuccessful gubernatorial bid in 2014. He resigned as treasurer in 2015, pleaded guilty to attempted extortion, and is awaiting sentencing.

On the stand, McCord has suggested several times that his legal troubles began after Estey secretly recorded him. It is not clear how long Estey did so, or what Estey recorded him saying.

On Monday, McCord acknowledged to the jury that Estey held himself out as a "middleman" of sorts, helping him raise campaign money from Republican donors who were frustrated with former Gov. Tom Corbett, a Republican who in 2014 was running for reelection.

One of those donors, said McCord, was the unnamed businessman whom Consiglio blocked him from naming.

In return for the donation, McCord promised to help that businessman's son get Treasury contracts. He also pledged to withhold payments to the businessman's competitors. (The state treasurer's office, among other duties, writes checks to vendors, state employees and others.

McCord did not give further detail.

The Inquirer has reported that in September 2013, Estey created a political action committee called the Enterprise Fund. It is not clear whether he did so at the request of federal authorities.

According to public records, the Enterprise Fund raised $125,000 over four days in late 2013, and months later gave it all to just one candidate: McCord.

Records show that $100,000 of the money came from Ross Nese, the owner of a Pittsburgh nursing-home chain.

The remaining $25,000 came from a PAC associated with Vahan H. and Danielle Gureghian. Vahan Gureghian is a Montgomery County lawyer and charter-school magnate known as one of the state's biggest GOP donors.

McCord on Monday also acknowledged that he awarded a $50 million contract as treasurer to another campaign donor from his 2008 run for treasurer, from Northeast Pennsylvania. Consiglio suggested the donor was not qualified for the job.

McCord had said that although he used the power of his office to extort campaign cash, he always viewed himself as a public "steward" and that he never jeopardized the public's money.

"You could have gone to the biggest institutions on earth … but instead you went to a small shop in Northeast Pennsylvania who had a third party give you a [campaign] check?" Consiglio asked.

"Correct," McCord responded.

Ireland's trial resumes Tuesday, when John Lisko, McCord's onetime chief of staff, will take the stand.