In the years leading up to his death in jail last week, notorious Boston mob boss James "Whitey" Bulger wrote about his regrets in life.

Bulger, imprisoned for life for his role in 11 murders, wrote a letter to three teenage girls in 2015, telling them he was "a ninth-grade dropout" who "took the wrong road". The former mobster said he was among "society's lower, best forgotten" members. He told the students, who had first written to him for a school history project, not to spend their time on him.

"My life was wasted and spent foolishly, brought shame and suffering on my parents and siblings and will end soon," he wrote.

The US Bureau of Prisons confirmed that Bulger (89) died last Tuesday at the jail in Bruceton Mills, West Virginia.

After being choked and beaten to death in his prison cell, Bulger was wrapped in a blanket and placed in his bed to make it look like he was sleeping. Bulger's killers went so far as to rest his head on the pillow after striking him repeatedly with a padlock stuffed inside a sock, said law enforcement officials.

Bulger, who ran Boston's Irish mob while feeding tips to the FBI to weaken his rivals, arrived at the West Virginia prison the night before he was killed. He was shipped there after committing "multiple infractions" at the Coleman penitentiary in Florida.

Paul J DeCologero, who has emerged as a suspect in the murder, never crossed paths with the Boston gangster before his arrival at the prison, but there was bad blood between their families. DeCologero's uncle, who is also serving a life sentence in a Kentucky prison for murder, has claimed Bulger once had a contract to kill members of the DeCologero family.

The three high school students - Michaela Arguin, Mollykate Rodenbush and Brittany Tainsh, all from Massachusetts - decided to build their project around Bulger, the former boss of Boston's notorious Winter Hill Gang. Arguin said that the theme was leadership and that, rather than choosing a positive leader, they chose a negative one, asking Bulger what he thought about his own legacy.

Bulger, from a poor family in Boston, started stealing when he was young. By the 1950s, he was robbing banks. By the 1970s and 1980s, he was heading his infamous gang, known for fixing horse races, among other crimes.

Although notorious in Boston, Bulger was largely unknown to the wider world until after he disappeared in 1994. In his absence, his darkest secrets, including his corrupt ties with FBI agents, were gradually laid bare in court hearings, media exposés and a congressional inquiry. He became a curiosity, sharing space with Osama bin Laden on the FBI's '10 Most Wanted' list.

Here in Ireland, he was responsible for arranging with IRA boss Joe Cahill to smuggle in weapons for the IRA.

Captured in California in 2011, Bulger was sentenced to two consecutive life terms plus five years after a Boston jury convicted him of 31 racketeering offences. The indictment against him catalogued 19 alleged murders, and he was found guilty of ordering or carrying out 11 of them. The verdicts in 2013 climaxed a gangland opera of fealty and betrayal that spanned half a century and combined two of Boston's abiding fixations: crime and politics.

But on February 24, 2015, Bulger replied to the students' letter from federal prison in Florida declining to participate and urging the teenagers to find a "more deserving" subject, such as a wounded service member.

"Good men isolated from society due to war wounds - life for some in pain and loneliness - hearing from school girls that care would do wonders for their morale and recovery," he wrote.

Bulger also talked about his brother, William Bulger, whom he called "A Better Man than I". His brother was a former president of the Massachusetts Senate as well as the University of Massachusetts, but was pressured by then-Governor Mitt Romney to resign in 2003.

Arguin, one of the students who wrote to Bulger, said in 2015 that his response was "shocking".

"It was a completely different side to what he shows to everyone else," she said at the time. "It was kind of weird we kind of had an impact on him, three school girls. You wouldn't expect that." But more than three years later, Arguin feels the same way.

"Looking back now, we honestly, truly reached out to try to gain a primary source for our project and never thought he would respond, let alone the broader implications this response has had about the historical understanding of Whitey today," she said after hearing the news that Bulger had died in prison.

Arguin, now 20, and studying at Boston College, said the fact Bulger expressed his views to the students was "unique" but what she found interesting was the way that he characterised his remorse.

"He felt badly about how he affected his family's reputation," she said, "but not for the families of the victims whose lives he took."

Still, Arguin said she was most stuck by his advice.

Bulger told the students: "Advice is a cheap commodity. Some seek it from me about crime. I know only one thing for sure - If you want to make crime pay, 'Go to Law School'."