By the time the rapper Prodigy sang what would become the most famous lyric of his decades-long musical career — “I’m only 19, but my mind is old” — he had already suffered through greater physical pain than most people will experience in a lifetime.

Prodigy, one half of the groundbreaking hip-hop duo Mobb Deep, was diagnosed as an infant with a severe form of sickle cell anemia, a blood disease marked by debilitating bouts of bodily pain. It didn’t stop him from revolutionizing rap music in the 1990s with the group’s bleak, foreboding vignettes of street life in New York City. But in his day-to-day life Prodigy worried often about when the next pain attack would come and how bad it would be.

On Tuesday, after being hospitalized in Las Vegas for complications from the disease, Prodigy died at the age of 42. The cause of death wasn’t clear, as The Washington Post reported. He was on tour at the time.

Born Albert Johnson, Prodigy wrote and spoke at length about how his battle with sickle cell anemia was as psychological as it was physical. His youth was disrupted by the chronic pain and frequent hospital visits, driving him toward drugs, alcohol and street crime as a teenager and a 20-something. But the anger and frustration that came with his disease were also part of what drove him toward hip-hop, he would later say. And as he grew older, he told NPR in 2013, living with sickle cell anemia made him focus on his mental and physical health, which had ripple effects on the rest of his life.

“It made me a better business person, having sickle cell. And it also stopped me from destroying my body with drugs and alcohol and all that,” he said. “It’s like a domino effect. That caused me to be a better person because when you take care of your health, you start looking at life different. And you start looking at people different. And your actions and your thoughts different.”

Prodigy, who was born in 1974 and grew up in Queens, was diagnosed with sickle cell anemia before he was a year old, he wrote in his 2011 autobiography, “My Infamous Life.”

The disease, which disproportionately affects blacks and Latinos, causes the body to produce abnormal blood cells shaped like crescents or sickles rather than discs. Sickle-shaped cells have trouble properly delivering oxygen to body tissue, which causes the extraordinarily painful attacks.

The long-term effects of sickle-cell anemia are grim. In addition to chronic pain, people with the disease can suffer a long list of problems, ranging from fatigue to ulcers to organ failure. They face increased risk of stroke, weakened immune systems, cardiovascular disorders and other devastating consequences. Life expectancy is typically between 40 and 60 years, according to the National Institutes of Health.

The disease was a daily reality for Prodigy, starting at a time before he had even formed memories. The ups and downs that came with repeated attacks and treatments affected his personality early on, he wrote.

“Extreme pain to extreme pleasure has been the story of my entire life,” he wrote. “That tremendous joy then pain then joy then pain again turned me into one moody li’l” person, he added, using an expletive not printable here.

As a boy, he learned to feel the attacks quietly coming on — in school, with friends, waiting for the bus. He described how he would walk slowly to stave off the wave of pain sweeping over his body, and wondered if the other kids thought he was disabled. He said he learned to stay calm and not worry about whether his schoolmates were gawking at him.

“A sickle-cell attack would creep up slowly in my ankles, legs, arms, back, stomach and chest. Sometimes my lips and tongue turned numb and I knew I was going into a crisis,” Prodigy wrote. “I was a very serious child who never got to enjoy life to the fullest like a normal, healthy kid.”

Four to six times a year, every year of his life, Prodigy was treated at the hospital, with some visits lasting as long as a month, he wrote. As time passed, the pain got worse.

“By the time I hit my teens, going to the ER was like going to war,” he wrote.

In his early teens, Prodigy once attempted suicide, hoping to release himself from the grip of his disease, according to his autobiography. Though he was never suicidal again, he wrote, he was self-destructive for years thereafter, first dabbling in marijuana and alcohol, then abusing painkillers, cocaine and angel dust. He also turned to robbery, drug dealing and other violent crime.

But it was around the same time that Prodigy discovered hip-hop and met Kejuan Muchita, his partner in Mobb Deep, better known by the stage name Havoc. They recorded their first album, “Juvenile Hell,” in 1993. Two years later, they released “The Infamous,” which is widely considered one of the most important rap albums of all time, a masterpiece of the hardcore genre, released at the height of East Coast and West Coast hip-hop rivalry. They would go on to release six more albums as a unit, and others as solo artists.

It was on “The Infamous” that Prodigy sang his unforgettable line. “I’m only 19, but my mind is old, and when the things get for real my warm heart turns cold,” he raps in “Shook Ones Pt. II,” amid gritty depictions of violence drawn from life in what was then one of New York’s toughest housing projects, the Queensbridge Houses.

At that point in Prodigy’s life, it was certainly a candid and unembellished introspection. He wrote of robberies and drug deals he took part in, of murdered acquaintances, of covering up friends’ crimes, of long nights of drug use that exacerbated his disease, and later of a “spiritual war” going on inside him after the group rose to the top of the hip-hop game.

There was no great turnaround point, no cliched revelation in which he gave up his old ways. If anything, Prodigy seems to have struggled for years to kick some of his more destructive habits.

But a three-year prison sentence he served from 2008 to 2011 for illegal possession of a firearm was a pivotal period. During his incarceration, he wrote, he reflected on his disease and how it had changed him.

“I used to be cold and emotionless. I believe the disease I was born with made me that way,” Prodigy said in his autobiography, written in part from the Mid-State Correctional Facility in Marcy, N.Y. “I’m different now, only because I choose to be.”

When he was released, he went on to advocate for people with sickle cell anemia, offering advice on eating a proper diet and staying hydrated. He even published a cookbook last year based on recipes he used to stay healthy while he was locked up.

One endearing video posted on the Sickle Cell Foundation of Georgia showed him talking with a 13-year-old boy about his eating habits. The disease isn’t a death sentence, Prodigy told him.

“I used to look at sickle-cell like it was a curse,” he said in the video. “It isn’t even about that. It’s like an alarm, like a burglar alarm, somebody break into your house, that’s what sickle cell is for your body.”

In an interview with DJBooth in 2008, Prodigy recalled how fans would come up to him at shows and ask him how he had so much energy on stage, how he fought through the pain, and how he had stayed alive.

“I always tell them, it’s the diet and the mental attitude too,” Prodigy said. “Every day I wake up like this might be my last day, and I’m not scared of it. I’m gonna go out there, do what I gotta do. I ain’t gonna let nothing stop me.”

More from Morning Mix: