Joy riding — stealing and destroying cars — is a rite of passage in the lawless but ritualistic world of disaffected youth in Ballymun, a community on the north side of Dublin. In “Joyrider,” through a series of cinematic black-and-white shots awash in light and movement, the photographer Ross McDonnell documented youths coming of age in a world of drugs, gangs and arson.

Ballymun is the site of Ballymun Flats, a high-rise public housing complex that is testament to the failures of 1960s city planning. With no employers or amenities nearby, the area succumbed to crime and poverty.

Ross McDonnell

Mr. McDonnell, 31, who grew up in a Dublin suburb, was thrust into Ballymun’s underworld in 2006 while wandering through the neighborhood on Halloween, a night notorious in Ireland — and especially in Ballymun — for bonfires and drunkenness.

“This young kid came up to me and said, ‘Mister, you want to see something crazy?’ ” Mr. McDonnell said. He was led to a roaring fire, where cars had been set aflame. “I was in awe of their capacity for lawlessness and one-upsmanship.”

For more than two years, Mr. McDonnell returned regularly to the Block, an abandoned, graffiti-riddled building where teenagers met, cut cocaine and heroin and planned their next escapades. He drove around with them as techno music blasted over their car stereos. He gave them prints of his photographs. (One group shot ended up on a prison cell wall.) With time, they accepted him as a member of their pack.

“They liked the fact that someone was interested in them,” said Mr. McDonnell, who was allowed to photograph some gang members on the condition that his photos didn’t implicate them recognizably. “Rather than condemn their actions, I was content just to hang out with them.”

In Ballymun, Mr. McDonnell found a sense of community he thought Ireland had lost as it rose to its brief moment as the economically formidable Celtic Tiger. Shots of boys in hoodies, track suits and sneakers spotlighted how visual codes serve as markers of an almost tribal identity, and a deep brotherhood.

“I felt that one of the consequences of the huge changes brought about by the Celtic Tiger was a loss of some of the things that defined us as Irish,” he said. “One of these things was our sense of community spirit, that notion that we were all in it together.”

Now based in Mexico, Mr. McDonnell is working with the crime reporters of Nota Roja, preparing for another documentary project.

Meanwhile, Ballymun is being transformed by an urban renewal project. Many of his friends have left. They have children and solid jobs. “Many of the guys moved on to assert their own identities,” Mr. McDonnell said. Without burning cars.