A retired Probation worker incensed prosecutors and drew threats of perjury charges on the stand in the federal corruption trial of his former bosses when he apparently contradicted his grand jury testimony and statements made in interviews with FBI agents, insisting he never said the things that were recorded.

William Mattei, the last witness called to the stand by prosecutors, insisted the scoring sheets of interviews with candidates for an assistant chief probation officer position that were shown to jurors by Assistant US Attorney Karin Bell were in his handwriting, even though Bell showed him transcripts of his interview with the FBI that indicated he thought someone forged his writing.

Mattei also denied ever saying he did not support Bernard Dow, the eventual choice for the position who was allegedly the favored candidate of former Probation commissioner John O’Brien, because his work ethic was “poor.”

“I’m not sure I used the word ‘poor,’” Mattei said even after being shown his 2011 grand jury testimony that apparently showed him using that term.

Bell, usually steady and soft-spoken as she questions witnesses, was livid, marching up to Mattei and showing him his testimony and the interview notes from the FBI. She repeatedly reminded him he was under oath and could be prosecuted for perjury, exchanges that brought loud objections from defense attorneys.

O’Brien and two top aides, Elizabeth Tavares and William Burke III, are charged with multiple counts of racketeering, bribery, conspiracy and mail fraud. Bell asked questions about Burke’s participation on the interview panel with Dow, but Mattei insisted it was someone else. Even when Bell showed letters addressed to Mattei, then-Worcester District Court chief justice Paul LoConto, and Burke confirming their participation in the interview panel, Mattei said he still didn’t think it was Burke on the panel.

On his scoring sheet, Mattei had ranked Dow third on the list of 16 but said he thought Dow was the most qualified because of his 30 years of experience and educational background. He said he ranked him third based on “personal issues” he had with Dow.

“That was wrong of me,” he said.

But Bell showed him testimony where he said he questioned Dow’s work ethic as well as his demeanor.

“Were you lying there or are you lying here?” Bell asked.

“I am absolutely not lying to anyone today,” he insisted.

Bell also showed the scoring sheet from LoConto with the rankings of the candidates in the same handwriting as on Mattei’s scoring sheet. Bell asked him how that could be.

“That looks like my handwriting, but I would never do that,” he said.

Mattei insisted he was badgered in the interviews with the FBI and Bell when he was questioned earlier this year and said he thought they were trying to get him to say things that weren’t true about the promotion of Dow. O’Brien attorney Stellio Sinnis asked Mattei if Friday’s questioning was an indication of Bell’s approach to him then.

“No, it was a very nice, professional, cordial conversation, but she was asking me things I think she wanted me to say,” Mattei said.

After Mattei stepped down, prosecutors read a statement to jurors from Burke’s testimony to special counsel Paul Ware, who had been tasked by the Supreme Judicial Court with investigating the Probation scandal in 2010. Burke told Ware he was friendly with and had attended fundraisers for several western Massachusetts politicians, including state Rep. Thomas Petrolati, the former Speaker pro tempore who was dubbed “king of patronage” by the Boston Globe. Burke said after he retired in 2010, he emceed a fundraiser for Petrolati where he introduced a number of politicians attending, including House Speaker Robert DeLeo and some local elected officials he dubbed “yahoos.”

Prosecutors also showed jurors two short clips of television interviews with O’Brien just after he was suspended when the Globe published its series on the patronage hirings. O’Brien defended himself by saying in both interviews all his hirings were approved by Robert Mulligan, then the chief justice of administration and management for the Trial Court and his statutory boss. That was part of the argument defense attorneys had been making throughout the trial.

After that, Assistant US Attorney Fred Wyshak, the lead prosecutor, stood and said, “The government rests.”