BOSTON -- Taunton District Court Judge Kevan Cunningham said he was resigned to the idea that Joe Dooley would be given the top probation job at Taunton District Court when in March 2006 he scored Dooley the highest after a job interview, even though he believed another candidate was better qualified.

Testifying in the trial of three former probation officials, Cunningham said he had been surprised when in early 2006, John O’Brien, who was then the commissioner of probation, told him Dooley would be appointed acting chief probation officer and would also receive the permanent post.

Cunningham said at the time he was trying to “resolve” the “nightmare” left over from when Dooley’s father was the presiding judge of the court, and “bitter enemies” with the clerk magistrate.

“I said I didn’t want to go back to the days when the different departments weren’t speaking to each other,” Cunningham said, recalling the January 2006 conversation with O’Brien. He said he feared “bad blood” with the arrival of Dooley, who he deemed “inappropriate” for other reasons, such as work ethic and his inexperience working in the fast-paced environment of a district court.

“He’s not known for his work ethic,” Cunningham said. He also said Dooley had “several very close friends who were local attorneys” who appeared in the Taunton court. Dooley was working as an assistant chief probation officer at Bristol Superior Court at the time.

Cunningham said O’Brien told him “Pacheco was putting enormous pressure on him,” though he didn’t make it explicit whether he was referring to Sen. Marc Pacheco, a Taunton Democrat.

Despite his misgivings, at the interviews for the permanent position in Taunton that March, Cunningham ranked Dooley first, giving him the same score as Carol Sylvia, whom Cunningham believed was best qualified for the job.

Federal prosecutors are attempting to prove the O’Brien and two of his former deputies, Elizabeth Tavares and William Burke III, systematically manipulated hiring processes in the public safety agency to ensure politically connected job applicants got hired and promoted regardless of whether they were the best candidates. Prosecutors allege Dooley’s hiring was fraudulent and part of the alleged hiring scheme.

Cunningham said when Dooley, the acting chief, was interviewed that March he was “afraid there would be bad feelings” if Dooley learned he was not the judge’s first choice, and he was worried Dooley would be “vindictive” against Sylvia.

“So you signed a lie? A judge, the regional administrative judge!” defense attorney Stellio Sinnis exclaimed. He asked, “You signed a lie?”

“I don’t believe it was a lie, sir,” Cunningham replied.

Cunningham is the regional administrative judge for the area, overseeing nine courts and 30 judges. He said, “I would not characterize it as a lie.” He said, “I knew Joe Dooley already had the position,” and conceded he “probably” down-scored Sylvia.

“Did you get indicted for falsifying your score sheet?” asked Sinnis. Cunningham said he has never been indicted.

All four participants on the interview panel where Cunningham was a participant rated Dooley their first choice. Cunningham said he told the other judge on the panel, Paul Dawley, who is now chief justice of the District Court, that Dooley was going to get the position.

Cunningham also testified that Mark McHale, who was one of two probation officials on the panel, along with Brian Murphy, told him to score the candidates in pencil.

“He said that’s how they want it,” Cunningham said, quoting McHale in a comment that Judge William Young struck from the record. Cunningham acknowledged the score sheet he submitted was not altered.

After he received the chief’s job, Dooley was arrested at his Taunton home after an alleged drunken fracas with his girlfriend on a Sunday night in March 2011. Dooley allegedly broke his own cell phone, grabbed at her cell phone, and grabbed her hair, according to the Taunton Gazette.

“There’s absolutely nothing to it – it was a simple misunderstanding,” Dooley said after his arraignment, according to the paper. Dooley retired from the department later that month, according to state records.

The information about Dooley’s arrest did not come up in the trial. Judge Young has generally disallowed testimony about events after a candidate was hired and after O’Brien’s 2010 ouster.

The current chief probation officer at the Taunton court is Kenneth Pacheco, who has no relation to the state senator.

The senator had been a past supporter of Dooley, according to a 2010 report.

Dooley told independent counsel Paul Ware that he sold fundraiser tickets for Pacheco and the longtime senator had supported him for the first assistant chief's position at the Bristol Superior Court.

"He supported me for the first assistant chief’s job and that if I did not receive the position, the commissioner would freeze the position," Dooley said, according to the 2010 Ware report.

Andrew Dooley preceded Cunningham as presiding judge at the Taunton court and retired in 1998. He served from 1970 through 1975 as an elected official on the Taunton Municipal Council, served in the U.S. Navy between 1946 and 1948 and was in private practice before Gov. Edward King appointed him clerk magistrate of the Brockton District Court in 1980, according to Governor’s Council records. King appointed Dooley judge of the Taunton Court in November 1982, in his lame-duck period. A Taunton resident, Andrew Dooley had also taught in the Taunton schools in the 1950s.

Cunningham is a Gov. Bill Weld appointee and was chief of the state attorney general’s narcotics unit from 1987 to 1991, a prosecutor in Plymouth County in the early 1980s and second assistant district attorney under former Bristol County District Attorney Paul Walsh from 1991 until he became a judge in 1996, according to Governor’s Council records and his testimony.