The bad old days of the Lower East Side seem almost as quaint, and as distant, as the neighborhood’s heyday a century ago, when its streets were abuzz with immigrants spilling out of overcrowded tenements.

Its once out-of-control streets have been tamed by New York’s great leveler, real estate development, which has turned shoebox-size studios into what now passes for luxury.

But the rough-and-tumble days were never far from Clarence Elie-Rivera’s mind. Having moved to the area in the 1970s, when his block on Ludlow Street was lined with abandoned buildings and full of heroin dealers, he spent more than two decades photographing the changes that swept over the neighborhood.

He had arrived there in his late teens, a young man whose love of motorcycles, and his penchant for popping wheelies on the street, earned him the trust of the guys on the block.

Like the police officers doing surveillance, he often photographed street scenes, from his apartment on the third floor. But unlike the police, he got to know many of his neighbors intimately over the years, taking pictures at birthdays, weddings, funerals and camping trips. His record of the era is a complicated tale of young men, harsh streets and elusive dreams of a better life.

He had lived on Manhattan’s Upper West Side until he was 12, until his father, a lawyer, felt the city had become too dangerous. His family eventually settled in upstate New York, in Livingston Manor, where Mr. Elie-Rivera became interested photography in high school.

He moved to the Lower East Side in 1978 and took a job working at a motorcycle shop. The block where he lived on Ludlow Street was a world of basement social clubs, kids setting off fireworks in the street, nonstop dealing, discount clothing stores and cheap tailors.

Photo

“It was very quiet at night, but during the daytime it was an open-air heroin market,” he said. “The addicts lined up from Orchard, down Houston and around the block.”

By the mid-1980s he had left his motorcycle job behind to take up photography in earnest, along with travel. Among his destinations was Puerto Rico, where he stayed in a house his mother had built; he went there with 200 rolls of Kodachrome and a couple hundred feet of black and white film in bulk. The stay helped him hone his style.

“I would go to roadside bars, drink a beer and start photographing the people I was talking to,” he said. “I never photographed people ‘street’ style. I had to have some rapport with them. I had to know something about you to photograph you.”

That approach guided him when he returned to Ludlow Street. Having befriended the young men on the street, they welcomed him into their circle. He got to know five young men, some of whom were in the drug trade, others just friends, well.

“It morphed into a lot of different things,” he said. “Baby showers, christenings, graduations. I would just go and do whatever anybody asked me to do.”

Sometimes he would take them upstate, near where he had once lived, for camping trips.

“It was like the Fresh Air Fund for thugs,” he said. “They would loosen up, get crazy and chill out, shooting BB guns or fishing. Boy’s stuff.”

Photo

He watched as some of his friends tried to straighten out their lives, like Fernando, who had served a five-year sentence on federal drug charges. After prison he went straight, getting a job preparing taxes, buying a house in the Bronx and becoming a father. When he was denied life insurance because he was overweight, he had surgery to slim down.

“Part of the band operation was, they put a filter in the vein by his groin,” Mr. Elie-Rivera said. “Two weeks later, the thing ripped and he bled internally. He went to the hospital where they told him his blood pressure was low. When he went back home, he collapsed and died, as he walked into his house.”

Back on the block, changes had begun to transform the landscape. Little by little, it gave way to expensive boutiques, hipster bars and luxury apartments, as longtime residents and merchants were pushed out by their landlords.

“I kept doing it until everybody started to move away,” said Mr. Elie-Rivera, now the staff photographer for AFSCME District Council 37, the city’s largest municipal labor union. “People were paid to leave, people went to Bushwick, or the shelter system.”

By 1997, the future was as inevitable as the past was obliterated.

“All these bars had opened up,” he recalled. “At three in the morning all these kids who didn’t even live in the neighborhood would come out, breaking bottles and throwing up on the street. And the cops did nothing. It was a real double standard.”

A few days ago Mr. Elie-Rivera ran into an old friend from the block.

“His family was one of the first families who were paid to move,” he said. “They ended up in Staten Island, which he hated. He made his way back there after applying for housing and getting an apartment by the Manhattan Bridge. He told me, ‘Bro, it’s so white around here. I remember when we hung out on the corner and the white people crossed the street to avoid us. Now, they don’t even care.’”

Follow @dgbxny, @celierivera and @nytimesphoto on Twitter. Lens is also on Facebook.