BOSTON — James “Whitey” Bulger, whose racketeering trial continues to be the best show in town, finally flashed a smile from his seat at the defense table Friday, although it was unclear from the context whether Bulger found one of his accusers amusing or was simply recalling better times.

The witness was Richard “Dickie” O’Brien, an understated, South Shore bookmaker, now 84 and retired to Florida. With his blue blazer, buttoned-down collar and striped tie, O’Brien looked as if he might have arrived in federal court from the yacht club.

The government called him to testify about events in the early 1970s, which was when news reached Bulger’s Winter Hill Gang that O’Brien was running his Quincy, Mass., office independently, meaning that he had been freed by a series of arrests from paying protection, or rent, to Boston’s Italian mob, sometimes referred to as The North End.

“Mr. Bulger wanted to talk to me,” O’Brien said. “He said, in so many words, ‘You are by yourself now.’ And he said, ‘I think you should be with us.’ I said, ‘Well, I was with The North End.’ He said, ‘Forget The North End. If you want to be in business, you are with us.’ That was put down as law.”

O’Brien said he knew he was not being presented with a choice. He began paying Bulger’s gang what would become $2,000 — and in many cases substantially more — every month, until O’Brien himself was arrested in the late 1990s.

“Of course, I had heard about them because their reputation had always preceded them, that they were very capable,” O’Brien said.

“What do you mean by capable?” Assistant U.S. Attorney Zachery Hafer asked.

“They had a gang war in South Boston and people were shot,” O’Brien said, “And Mr. Bulger ended up on top. You can draw your own conclusions.”

“Why did you agree to pay rent?” O’Brien was asked.

“I valued my own life,” he said, “as well as those with me.”

O’Brien was no newcomer to the gambling racket. He inherited the business from his father and passed it on to a daughter when he retired. Once, when summoned to a meeting with a Bulger associate, O’Brien said he ordered his daughter to call the FBI’s Miami office if he was not back in 12 hours. He said he had became suspicious of agents in the Boston office after learning that Bulger was providing sliding glass doors for a home owned by a Boston agent.

But despite O’Brien’s apparent distaste for Bulger’s violence, he benefited, more than once.

He said he once dragged a business associate who owed him thousands of dollars to a meeting with Bulger. After some sharp words from Bulger, the associate agreed to a prompt repayment. But the associate wanted to leave the meeting with some dignity. He told Bulger that after the debt was paid, he would run his own business, however he chose to run it.

“You are going to go your own way?” O’Brien recalled Bulger saying. “You know, we have a business besides bookmaking. And (the associate) said, ‘What’s that?’ And Mr. Bulger said, ‘Killing a–holes like you.’”

Over the opening three days of his trial, Bulger’s expression, when visible to the public, has been something between bored and distracted. O’Brien’s crack made him laugh, although it was not clear why.

O’Brien and another retired bookmaker, James J. Katz, gave hours of testimony that supported the government’s contention that Bulger was part of a racketeering conspiracy that used threats and violence to extort millions of dollars of rent payments from dozens of bookmakers for more than three decades, beginning in the 1970s.

He is accused in the indictment against him of collecting millions more by extorting payments from drug dealers. He is accused of laundering the money in real estate or using it to bribe law enforcement officers. He is charged additionally with participating in 19 murders, four of which were part of the gang’s attempt at a hostile takeover of the parimutuel business World Jai Alai in the early 1980s.

Throughout much of the period covered by the indictment, federal prosecutors said that Bulger and his longtime partner, Stephen Flemmi, were FBI informants, providing information about their rivals in the Mafia. A state law enforcement witness has testified that the local FBI office regularly protected the two by sabotaging investigations by other agencies.

Bulger denies being an informant and specifically denied involvement in half a dozen of the murders — those of two women and four victims of the jai alai takeover. But his defense team started speculation about strategy when it conceded to the jury in its opening statement that Bulger sold drugs, extorted millions in payments and was involved in illegal gambling.

Katz and O’Brien became reluctant witnesses after they were arrested under a plan developed in the early 1990s by the Massachusetts State Police and the U.S. Drug Enforcement Administration.

The plan, which ultimately succeeded and is responsible for Bulger’s trial, was to hit the bookmakers whose extortion payments were a major source of Winter Hill income. The investigators hoped to pressure bookies to cooperate by threatening them with hefty fines and long sentences for gambling and financial crimes.

The problem, at least initially, was that the bookies were more afraid of Bulger, Flemmi and other gang members than of going to jail.

Katz, a wiry, raspy-voiced retiree who also spent his adult life taking sports bets, testified that after his arrest, he first lied to the grand jury investigating Bulger’s gang and later refused to appear before it. He said he continued to refuse even after he had been sentenced to four years in prison on bookmaking charges, to another 18 months for refusing to testify, and after learning that the Department of Justice was taking his house and putting his wife and children on the street to satisfy a $1,055,900 fine.

“I knew that the people who I would testify against had reach,” Katz testified Friday. “They could even reach me in jail.”

Katz ultimately changed his mind, in March 1994, after federal prosecutors agreed to give him a new identify, relocate him and place him in the Federal Witness Protection Program. A judge also reduced his sentence to time served and waived the fine.

Bulger was tipped off in 1995 to a pending indictment. He was a fugitive for 16 years until he was caught two years ago.

Bulger lawyer J.W. Carney Jr. implied through his questioning on cross-examination that Katz was testifying falsely, essentially giving the government what it needed to convict Bulger out of gratitude for his sentence reduction and the financial support that he and his wife received while in the witness program.

Bulger’s lawyers are expected to cross-examine O’Brien when the trial resumes Monday. The government indicted O’Brien on charges of perjury and obstruction of justice before he agreed to testify against Bulger.

O’Brien told the jury during his direct examination Friday that he was so afraid of Flemmi that he tried to avoid meeting him whenever possible.

Flemmi wasn’t around, he said, when Bulger imposed rent payments on him. He was, as O’Brien put it, “on the lam” in Canada. Tipped off by a friendly FBI agent, Flemmi fled an indictment accusing him of setting a car bomb that crippled a lawyer for a government witness.

But later, O’Brien said, Flemmi proved helpful. O’Brien dragged another debtor he identified in court as “Timulty” to a meeting with Bulger and Flemmi. O’Brien said that Bulger and Flemmi took Timulty into an office and asked O’Brien to wait outside.

Timulty emerged, shaken, sometime later.

“He said, ‘Will you drive me somewhere where I can get a drink?’” O’Brien said. “And I said, ‘Certainly.’”