Former Massachusetts Treasurer Tim Cahill is off the hot seat after two days of testimony in which his lawyer and prosecutors questioned him about taxpayer-funded lottery ads they say Cahill ran to promote his failing 2010 gubernatorial campaign.

It was day two of tense testimony and Cahill grew prickly after two hours on the witness stand. Assistant Attorney General James O’Brien cross-examined Cahill, asking him why he authorized 2 million taxpayer dollars in ads for the state lottery at the same time as he consulted with strategists about boosting his 2010 gubernatorial campaign. Cahill ran as an independent. He said he approved ads to defend the lottery against critical ads from the Republican Governors Association.

With casually sloped posture, Cahill said he and lottery executives were not focused on his reputation, but on the lottery’s brand and hurting sales. But O’Brien also pressed Cahill on his involvement in editing the ads.

Prosecutors continued to imply Cahill reached into the pockets of the lottery to help his struggling campaign.

Cahill, his attorney and family declined to talk to reporters as they left the courtroom. The judge gave the jury Monday off and closing arguments will begin Tuesday. Cahill is facing up to five years in prison if convicted.