For more than 20 years, the Irish-American mobster known as James "Whitey" Bulger played an audacious double game in working-class south Boston. He fixed horse races, forced businesses to pay him off or sell up, and told his debtors to cough up the cash if they didn't want to have their ears cut off and stuffed in their mouths.

His mob, the Winter Hill gang, supplanted the local mafia – taking over their drug rackets and leaving a trail of corpses. And Bulger did it all with the support, if not the encouragement, of the FBI, which nominally was using him as an informant but allowed him to expand his power by arresting and imprisoning many of the rivals who stood in his way.

It was one of the most scandal-stained crime sagas in modern American history, which came to a surprising end on Wednesday. In an incongruously comfortable beach community in southern California, 81-year-old Bulger, a federal fugitive since 1995, was found living quietly with his partner in an apartment building filled with white-haired pensioners and beach bums who never gave him a second look.

Bulger and his 60-year-old partner, Catherine Greig, were arrested without incident after police lured him outside the building.

The FBI said it had confirmed their location 24 hours earlier, possibly as a result of television ads they starting running a day earlier on daytime chatshows, in which they described Greig's multiple plastic surgeries and fondness for regular dental cleanings.

Their modest apartment was searched overnight, yielding firearms and a large quantity of cash. Both were due to make their first appearance in federal court on Thursday.

Years ago, Bulger told his secret FBI handler that "you can't survive without friends in law enforcement". So it proved.

"It's a long time coming and we're glad he's finally in custody," Brian Kelly, a federal prosecutor who has been gunning for Bulger for years, told the Boston Globe.

The FBI was covered in shame in the 1990s when it emerged that its Boston field office had essentially become one with the forces of organised crime.

Bulger's handler and childhood friend, retired agent John Connolly, was convicted on racketeering charges and sentenced to 10 years in prison, where he remains. Bulger's brother, for years a prominent Massachusetts politician, was forced to resign as president of the University of Massachusetts after he disclosed he had phone contact with Whitey after he was officially on the run.

The FBI switched roles from abetting crime to co-ordinating a worldwide manhunt. Bulger had fled Boston shortly before he was due to be indicted, tipped off by Connolly, and was believed to be constantly on the move, relying on cash deposits hidden around the world to keep one step ahead of the feds. His longtime partner, another secret FBI informant called Stephen Flemmi, chose to stay in Boston and was rapidly arrested and jailed.

Bulger's story found multiple echoes in Martin Scorsese's Oscar-winning thriller The Departed, with its themes of double-dealing between the worlds of crime and law enforcement. He was a fixture on the bureau's Ten Most Wanted list, right below Osama bin Laden – another man who enjoyed the protection of the American establishment before becoming an enemy. The reward money for information leading to his arrest kept increasing, rising to $2m (£1.25m).

In 2002 Bulger was seen in London, only to vanish again. More recently there was an unconfirmed sighting in Fountain Valley, a suburb south of Los Angeles, and some people speculated that a pensioner who robbed three Orange County banks might have been him. (It almost certainly wasn't.)

The FBI had known Greig was more likely to show herself than her companion, appealing for information from doctors or dentists should anyone meeting her description walk in for an appointment.

Intriguingly, the television ads did not play in the Los Angeles area — suggesting, perhaps, that the couple were already under surveillance and that they were a diversionary tactic by the feds to lower their guard and minimise the risk of a shootout, booby traps or other dangers.

Bulger's alias was Charlie Rosenzweig. With his balding head and glasses, framed by the white hair that gave rise to his nickname, he would have had no trouble passing himself off as just another old Jewish guy taking daily walks on Santa Monica beach and ambling around the farmer's market, a couple of blocks from his apartment.

The FBI said he did not appear to be in good health, but gave few details. A statement said merely: "Recent publicity produced a tip that led agents to a residence in Santa Monica, California, where they located Bulger and Greig Wednesday evening."

Bulger is wanted for 19 murders, including that of an Oklahoma businessman suspected of skimming money off the Winter Hill gang's gambling operations, who was shot in the head at a Tulsa country club, and a Florida gambling executive whose corpse was found in the locked boot of his Cadillac at Miami airport.

Much of the evidence against him emerged after he was "outed" as an FBI informant. Outraged former associates came forward with an avalanche of information likely to guarantee he will now die in prison.