BOSTON -- Testimony Wednesday in the trial of John O’Brien, the former probation commissioner accused of secretly operating a patronage system at the public safety agency, shed light on a power struggle within the state judiciary.

O’Brien had clashed over hiring procedures with former Chief Justice of Administration and Management Robert Mulligan, delegating his top aide John Cremens, who testified under immunity Wednesday, to meet with the judge.

Through the 1990s, local judges had the power to appoint probation officers in theirs courts, but a 2001 law gave that power to the commissioner of probation, though O’Brien still needed Mulligan to sign off on the hires.

O’Brien, who lives in Quincy, andhis former deputies Elizabeth Tavares and William Burke III, are accused of using their appointing authority to offer jobs to candidates with political backing, hiding the patronage under a series of rigged interviews. Cremens said Mulligan would hold up appointments well past the 14 days he was allotted, and criticized O’Brien’s personnel decisions.

In a March 2005 letter to O’Brien, Mulligan objected to the “mind-numbing process” of conducting 3,800 interviews that he said O’Brien required to fill 52 positions, 15 of which already had temporary appointments.

“You made it clear that you did not want to have judges involved in the process and that you considered it an imposition on your authority,” Mulligan wrote.

Mulligan had demanded that probation officials winnow the candidates down to eight through a screening process, allowing judges to participate in interviews without as much of a time commitment.

“I informed you that judges would not be available to conduct thirty-eight-hundred interviews. I referred to it as a mind-numbing process, disruptive to court business,” read the March 22, 2005 letter from Mulligan to O’Brien that is part of the evidence in the trial. Mulligan said the 3,800 interviews and the fact that 15 of the 52 positions had temporary appointees who were “very likely” to win the full appointment fulfilled O’Brien’s “prophecy that judges would not want to be involved.”

After that, Cremens said, probation added a screening panel to the hiring process, in addition to an interview that included the local judge, local chief probation officer, and a top probation official, and the final interview conducted by two probation officials. According to prosecutors, the whole process was rigged to ensure that O’Brien’s selection who had political backing would make it to the final interview and then receive the highest score.

Page 2 of 4 - Before 2001 when the Legislature changed the law, local judges – not the commissioner – had the ability to discipline probation officers in addition to appointing them. Cremens agreed with O’Brien’s attorney Stellio Sinnis that under the older system, the probation commissioner was a “figurehead” similar to “the queen of England.”

Though Sinnis said he had made up the analogy, Cremens, who retired in January 2008, said he had “heard it before.”

According to prosecutors, the three schemed to earn “political currency” by steering jobs toward candidates with backing of powerful officials in the Legislature and elsewhere, even if they lacked experience, had problems with drugs or did not perform as well as others in standardized interviews.

Cremens, who is 71, at times contradicted himself. First he told federal prosecutor Fred Wyshak that he had been “truthful” and “apprehensive” meeting at a Burlington Bickford’s with Paul Ware, an independent counsel who investigated patronage in the probation department after a 2010 Boston Globe expose.

Later he acknowledged he had not been truthful.

“Why did you lie to Mr. Ware?” Wyshak asked.

“At the time I didn’t know what was going on. It was an informal discussion,” Cremens said Wednesday on the stand. Pressed further, he said, “I didn’t know whether I might be involved in anything. A lot of stuff transpired at probation.”

The son of a former state representative from Cambridge, Cremens had worked with O’Brien at Suffolk Superior Court in the 1990s, and when O’Brien became commissioner in 1998 he made Cremens his first deputy. On the stand, Cremens said his memory had been better when he was working, and said he is not well versed in the role of probate and family probation officers, who play less of a law enforcement role, or the electronic monitoring system, both of which are overseen by the office.

Cremens said the only personnel matters that he participated in was appointing chief probation officers, and after being pressed by Wyshak he said on at least two occasions he believed the most qualified candidate had not been hired.

One of those hires was James Rush, father of then-Rep. and now Sen. Michael Rush. Asked if the status of the job applicant’s son played a role in the hiring, Cremens said, “Yes it did.”

Court broke Wednesday just as Cremens was attempting to recall the name of another candidate from the South Shore.

Cremens enjoyed the support of his fellow assistant chief probation officer O’Brien when he was in the running for chief probation officer at Suffolk Superior, and said that O’Brien had backed Mulligan in his bid for chief justice, but about five years later “things were becoming tense in their relationship.”

Page 3 of 4 - After working with Cremens at Suffolk Superior, Cremens worked as legislative liaison to former Chief Justice of Administration and Management John Irwin, and had headed up the fledgling Office of Community Corrections.

When Sinnis attempted to ask Cremens about the hiring of court officers, Wyshak objected, the attorneys spoke quietly with the judge and the matter was dropped. In his opening statement, Sinnis said Mulligan hired court officers in much the same fashion as O’Brien hired probation officers. Mulligan will be a witness, Wyshak has said.

At some point, Cremens began joining O’Brien for regular meetings with Mulligan, and later attended on his own, where Mulligan would show Cremens applications of job-seekers he thought were more qualified than the person who was appointed to the position.

“I told him, ‘Chief, I am not handling the hiring,” said Cremens. He said even though he was aware from lunch table banter in the cafeteria at One Ashburton Place and from his own assistant that there was a list with favored hires, he did not tell Mulligan about the role favoritism played. On Wednesday, he acknowledged he “had an obligation” to tell Mulligan, but did not.

Cremens said he was “upset” that people with less experience were getting promotions over more veteran members of the department.

“It bothered me, personally, what was going on,” Cremens said.

Wyshak asked Cremens why the final interview was even “necessary.”

“I don’t know why,” Cremens said.

“Well you were the first deputy commissioner of probation,” Wyshak responded.

In 2004, when Mulligan transferred money out of the probation department budget to other areas of the Trial Court, O’Brien became “upset” and the next year the law prohibited such transfers, Cremens said.

Cremens’s career in probation began after working for an insurance company and a bus company. His sister is a judge and he previously worked in a family restaurant in Cambridge, Cremens said.

Cremens was the direct supervisor of Tavares, before he retired in 2008 and she took his position. Under questioning by Tavares’s attorney, Brad Bailey, Cremens said even though he was aware Tavares would receive names of preferred candidates, he never asked her to stop.

“Would you agree that you were giving your tacit approval to her?” Bailey asked.

“No,” Cremens said.

Cremens also contradicted Ellen Slaney, another prosecution witness, who said she had inquired about her niece’s application for a probation officer job, but had not sought to influence the decision beyond seeking fair treatment for her niece.

Page 4 of 4 - Cremens said Slaney approached him “asking me for her niece to get a position as a probation officer.” Cremens said he “did nothing.” Slaney’s niece was appointed, and is now in a different job, Slaney said previously.

Before his testimony began on Tuesday, Cremens said, FBI Agent Kevin Constantine told him in a court hallway that he and another person he was talking to are co-conspirators in the case.

“Two or three of us were just having a general conversation,” Cremens said. He said, “One of them said, ‘Do you realize you’re unindicted co-conspirators?”

Cremens also said he had met with Wyshak after his testimony Tuesday, and said Wyshak went over what he would ask him, but did not tell him how to answer.