Three years before the trial of convicted killer Keith Luke, which ended last month, Superior Court officials laid out an extensive security plan for the Belmont Street courthouse.

Nearly a dozen court officers were in the courtroom and they surrounded Luke every day during his three-week trial, which ended with his conviction on murder and rape charges on May 30. Typically, two court officers preside during a trial, officials said.

The extra courtroom muscle and security added to the estimated high tab of Luke’s trial, which included several medical experts who testified for the prosecution and defense, the work of four prosecutors who prepared for four years leading up to the trial, and a defense attorney who cost $100 per hour, officials said.

“He brought certainly a lot of issues to the table that had to be addressed and dealt with,” Plymouth County District Attorney Timothy Cruz said.

Luke, 26, a self-proclaimed white supremacist, went on a hate-filled rampage in Brockton that left two dead and a third critically wounded on Jan. 21, 2009. He later confessed to police that he committed the crimes.

On May 30, before an emotionally charged and packed courtroom that included a surviving victim, Luke was convicted in the shooting deaths of Selma Goncalves, 20, and Arlindo Goncalves, who are not relation, and in raping and shooting a third victim. All three victims were of Cape Verdean descent.

Court officials said they began to plan the extra security measures in 2010, after Luke tried to kill a psychiatrist, who is Jewish, during a mental evaluation at a Plymouth jail. Luke had planned to end his 2009 rampage by killing bingo players at a synagogue.

At the request of defense attorney Joseph Krowski Jr., Judge Frank Gaziano allowed Luke to stand trial unrestrained, not wearing handcuffs and leg shackles. Court officers, authorities and others were concerned Luke would act out during the trial, and that his notoriety could draw other white supremacists to Brockton for the trial, authorities and court officials said.

To prepare for the worst, officials brought in a special chair and table, that were both weighted down, and at which Luke sat during the trial. Two vans and a cruiser from the Plymouth County Sheriff’s Department transported Luke to court every day. One van carrying Luke would park inside the courthouse garage, then another van and cruiser would block the garage door at the courthouse as Luke went inside.

Brockton police cruisers were parked outside the courthouse during the trial. Inside the courtroom, at least three members of the Plymouth County Sheriff’s Department and Brockton police, wearing plain clothes, sat behind Luke every day he stood trial.

When asked about the cost of Luke’s trial, court officials revealed no amounts, saying a final tab could not be immediately determined since costs come out of various public budgets.

But Cruz, the district attorney, cited an old court estimate of a murder trial costing “$1,500 or $1,600 bucks an hour.”

On May 21, the second week of Luke’s trial, one juror failed to show up on time. The judge admonished the juror that the entire court had been held up by his tardiness.

The cost for Luke’s trial is “thousands and thousands of dollars,” Cruz said. “But it will be nothing compared to the (Whitey) Bulger case.”

Luke’s trial saw a security plan the Brockton Superior Court had never seen before, said Plymouth County Clerk of Courts Robert Creedon. Typically, two court officers preside over a trial, but Luke’s trial brought in court officers from other county courthouses, Creedon said.

A 10-page security plan went out to Brockton and state police, the sheriff’s department, and court officers and personnel, he said.

The plan intended to keep court employees and the public safe during Luke’s trial, Creedon said.

“We had clerks in there, and stenographers and folks who could get hurt,” Creedon said. “The security folks were prepared in spades.”

Creedon declined to release the security plan because it will be used for future trials. The plan “involved aspects that weren’t readily discernible if you walked into the court,” Creedon said.

“A trial like that doesn’t come down the road every other month, it’s unusual,” Creedon said. “Thank God.”