O’Brien and his first deputy, Elizabeth Tavares, are facing up to 20 years in prison for their conviction on six charges of racketeering and mail fraud. Another aide, William Burke, faces a maximum of 20 years for his conviction on a single charge of racketeering conspiracy.

The long and winding trial ended the way it began, with an assertion by the government.

“Bottom line, the evidence showed — and clearly the jury agreed — that this case was about a fraud perpetrated by Mr. O’Brien and his deputies on the citizens of the commonwealth,” U.S. Attorney Carmen Ortiz said outside federal court on Thursday.

The government alleged the co-defendants were running a rigged hiring scheme by awarding jobs to the politically connected, while making it look like they were given on merit. And in return for the favors, prosecutors said, legislators voted for bigger budgets as well as other power.

“When you commit fraud, and you tamper with documents, that’s just not mere patronage. And that’s where we draw the line,” Ortiz said.

The jurors were closing in on the end of day seven of deliberations when they filed into the courtroom. They had deliberated on 104 verdicts.

In the front row, where they had sat everyday of the trial, O’Brien’s wife and three daughters tensed. One of them started quietly sobbing. At the defense table, O’Brien’s shoulders trembled as the forewoman began reciting the verdicts.

“Mail fraud,” she said. “We find John J. O’Brien guilty.”

A gasp came from the first row as O’Brien’s head dropped to the table.

“The government is corrupt,” his wife yelled, as his daughters cried loudly.

“Elizabeth Taveres, on aiding and abetting,” the forewoman read aloud. “Guilty. Co-conspirator, guilty.” Taveres dropped her head and put her face in her hands. And in the second row, her wife did as well.

On went the roll call. “Guilty, guilty, guilty.”

O’Brien’s wife collapsed and fainted. Someone called for an ambulance, her family bent over her trying to revive her. Amid the uproar, Judge William Young had the roll call of the verdicts continue.

It was as if neither the defendants nor their defense attorneys had any expectation this was coming.

“Certainly very saddened by what happened in there,” said Jeffrey Denner, a defense attorney for Tavares. “Don’t feel it was consistent with the evidence.”

The defense had argued there was no fraud, no racketeering — only prosecutors’ misuse of federal powers and a statute devised to bring down mobsters.

They claimed that the RICO statute was used to bludgeon people engaged in the kind of patronage that was practiced throughout the system by judges and legislators, who are not held to the same account.

Like the making of laws and sausage, they argued, it may not have been pretty, but it was not illegal.

The third defendant, William Burke, had been mentioned only a few times at trial and faced the fewest charges. A few minutes before the jury returned, he commented that either way, he just wanted the ordeal over. He had a run of “not guilty” verdicts, until the last charge in the last count.

“Conspiracy to engage in racketeering,” a juror read. “Guilty.”

For Burke, a new ordeal was beginning. Even his attorney, John Amabile, cried.

“It was a complete shock I think to all of the defendants,” Amabile said. “I respect the jury, but I think the verdict was a miscarriage of justice. I think the verdict amounts to scapegoating low level functionaries without really any kind of a notice for longstanding political practices.”

Sixty witnesses testified on behalf of the government in this trial, with 34 witnesses designated as “un-indicted co-conspirators,” including state representatives.

According to the government’s theory, those representatives had been bribed by O’Brien with jobs. A two-year federal grand jury investigation called dozens of legislators. And even though the prosecutors alleged that O’Brien bribed legislators, not one who the government said had taken the so-called bribes was indicted.

In the end, only three bureaucrats were put on trial.

“I really take issue with the three defendants that were in court as being just mere functionaries or bureaucrats,” Ortiz said. “To the head of the Probation Department and his right hand people, in charge of an agency that employed over 1,800 individuals, in charge of hiring and making really important decisions.”

This was the first time Ortiz was publicly questioned about the prosecutors unusual step of naming House Speaker Robert DeLeo as a primary actor at the center of the criminal enterprise. Prosecutors alleged that DeLeo joined O’Brien in bribing fellow legislators with probation jobs in return for their votes to make him speaker of the House five years ago.

“I know there have been many comments stated in the media, but we are not trying this case in the media,” Ortiz said.

Yet the prosecution’s naming of DeLeo essentially put his reputation on trial in the public, without him having a chance to defend himself, according to DeLeo’s attorney and several former federal prosecutors.

“I am going to rely on what was presented in court because that’s where cases get tried in this office — in a courtroom and not here in front of the media,” Ortiz said.

So in the end, the probation commissioner and his two deputies were the only defendants on trial. And they were all convicted.