RIO DE JANEIRO, BRAZIL — McDonald's brother died two months ago. The pudgy 15-year-old was electrocuted by the 3,300-volt cable as he stood atop a fast-moving suburban train here. For a train surfer, it was a typical death.

"He shriveled to the size of a ham. The electricity ate through his fat," says McDonald, whose real name is Joabe Pereira da Silva. Though he is distressed by his brother's death, McDonald has been unable to shake his own train-surfing habit. "I got used to it," he says, "and I can't stop."

The 7:40 a.m. train pulls into Nilopolis station, in the midst of Rio's abject northern suburbs. McDonald, so nicknamed because he once worked for a local outlet of the U.S. hamburger chain, is wearing red laceless basketball shoes, yellow Bermuda shorts labeled Windsurfer and a plaid shirt. "He shriveled to the size of a ham. The electricity ate through his fat," says McDonald.

He shuns the packed interior of the train. As it pulls out, he clambers onto the window ledge, and from there claws his way onto the roof. He stands dangerously close to the cable, which is a few feet above the roof, as the train moves toward a top speed of 75 miles per hour. The 16-year-old is surfing.

Riding the tops of trains is a stunt popular among the poor youths of north Rio. Their counterparts in the wealthy south of the city surf the waves; they surf the trains — despite 200 deaths and 500 injuries over the past 18 months. The so-called "surfistas" abound on the early-morning and evening trains into and out of the city center. Adopting nicknames like Rambo, Stallone and Pistoleiro, or Gunman, they are drawn by the macho appeal of defying danger and a camaraderie that bears the fervid intensity of a blood rite.

"It's our sport," says Artur, who is revered because he break-dances on the train. "If you fall, you've gone soft and you're finished. That's it."

Rambo, whose real name is Jose Lira de Minezes, was once king of the surfers. A clean-cut 23-year-old worker in a curtain factory, he was known for his stylish surfing. But he knew the sport was madness. Last December, he went on television to make an appeal to other surfers. Of his 20 closest friends, he told viewers, 19 were dead. Looking straight into the camera, he added, "This is stupid. It's not worth it. We should stop."

But a few weeks later, Rambo was surfing again. Three months after his television appearance, he died after falling from a train as it rounded a bend.

Lucio Alves, nicknamed Stallone, took over as top surfer. He was killed in June. His cousin, Maria di Fatima Barbosa, or Russa, is one of the few female surfers. "Surfing is a joke that leads to nothing," she says. "But the air up there is so good."

The new leader is Pistoleiro, a handsome 21-year-old who will only give his first name, Nelson. He and the gang gather at the Central Station around 6:30 every evening. They are a motley crew. There is Formigao, or Giant Ant, with his arm in a sling from a fall three months ago; Orelinha Eletrica, or Electric Ear, who has hit the cable three times and survived; and Indio, whose younger brother lost his legs two months ago when he fell. What did Indio feel about that? "Nothing," he says.

Some surfers, among them McDonald, are street hawkers. Others work as office boys, carpenters or glass-cutters, earning roughly the equivalant of $50 to $100 a month. They insist vehemently that press images of them as drug addicts or thieves are false. They are regular guys, they say — except for the fact that they are hooked on a deadly sport.

Asked about the death of his friend Rambo, Pistoleiro says, "Whoever falls, was." The surfers worship film heros, such as Charles Bronson and Arnold Schwarzenegger. They proudly display their wounds: burns, bald patches, and scars. They don't want to die, they say, but death doesn't scare them.

Death is the only thing that will stop them, they say.

They seem remarkably untouched by the loss of friends or even family. Asked about the death of his friend Rambo, Pistoleiro says, "Whoever falls, was."

Only talk of their parents seems to move the youths. They realize it's tough to be a surfer's parent. Carlos Maciel, an office boy, says his mother has implored him to stop. McDonald is protective about his mother, who is still in shock from his brother's death. But her grief isn't enough to stop him.

Francisco Machado, a retired railway worker, lost his son a couple of years ago. The boy's legs were sliced off in a fall from a train. Mr. Machado barely holds back his tears as he talks about the tragedy. "I feel it in my skin," he says. He seems tortured by trying to understand why his son did it. "It's a form of suicide," he says. "Brazilian youth is suffering so much, they see no reason to live."

Train surfing has caught on as the nation's economic crisis has deepened over the last 18 months. Inflation of nearly 800% over the past year is tough on everyone, but it bites particularly hard in the Baixada fluminense, a poverty-stricken sprawl just a few miles north of the plush opulence of south Rio. On the average, five people a day are murdered in this slum, which 2.6 million people — including many surfers — call home. Here, death squads roam, drugs abound, police connive and corpses are regularly dragged from the rivers.

"Train surfing stems from the acute social problems here. As inflation multiplies, so does crime," says Evandro Steele, a state prosecutor who has handled several cases involving train surfers. Debt-ridden, Brazil does not have the money to police its trains, he argues. Nor, it seems, can it offer the education or jobs to instill a greater attachment to life.

McDonald's life illustrates the misery. When he arrives in town in the early morning, he takes it easy for a while. Then he goes to a wholesale candy store and buys a box of 30 chocolate bars for 1,800 cruzados, or about $4. During the day, he sells the bars on trains. His daily profit of about $2.70 will go to help pay his family's rent of roughly $23 a month. McDonald dreams of better life. He says he would like to be a chauffeur for a "Madame." In the meantime, he surfs.

The state-owned Brazilian Urban Trains Company, or CBTU, has tried to stop the surfers, but it is beset by other problems. When trains are late, angry passengers sometimes stone them or set them on fire. Copper is stolen from wires, stalling signals and causing accidents.

CBTU's fare, about seven cents, covers less than a third of its operational costs. Chronically underfinanced, the company lacks the resources to hire guards to prevent surfing. Nonetheless, it is required to compensate surfers and their families for deaths and injuries. Over the past 18 months, CBTU paid out $500,000 in compensation.

"We've tried everything to put an end to the madness of train surfing, but we can't," says spokesman Helio Barros. Earlier this year, CBTU organized an exhibition featuring photographs of dead or crippled surfers. Some photos showed limbs mutilated by falls; others showed electrocuted surfers, attached in hideous contortions to the electric cable. The exhibition drew crowds but didn't discourage the surfers. The prosecutor conceded there was no proof that train-surfing had ever caused a rail disaster. So surfing still carries only a $2 fine.

The company has tried prosecuting surfers. It took nine of them to court this year and charged them with disrupting train service. But the case was thrown out after the prosecutor, Mr. Steele, conceded there was no proof that train-surfing had ever caused a rail disaster. So surfing still carries only a $2 fine.

As the packed 7:30 p.m train pulls out from the Central station, the gang seems happy. They pass around a bottle of wine. Russa introduces her friend Beth, who has given up surfing for the moment because she is pregnant. Then, pulling on woolen hats or tying scarves around their heads, Pistoleiro and several others climb out the window and up on top of the train. They scream and wail and stamp on the roof.

The train picks up speed, swaying and jolting. Suddenly, another train whooshes past, and there is a blue flash of electricity. Russa is worried and, after a moment, strains her head out the window of the car to see if anyone has been hurt. "Don't worry," says Rogerio, who is inside the car playing cards for small stakes. "Somebody would have said something if one of them were dead."