At the eight-minute mark of the final of the CAN 18 soccer tournament, the players on the Mauritania team score three times in rapid succession.

The balls hitting the goalkeeper’s small net sound like the blasts of a cannon. Boom. Boom. Boom. The last two happen so quickly that many in the crowd miss them.

“Did they score?” the Ivory Coast fan squished next to me asks, looking stunned. “Yes, twice,” a Mauritanian fan on my other side responds gleefully.

It doesn’t take long to understand that the annual soccer tournament of Paris’s 18th arrondissement is different: The stadium is a small, caged turf court in the middle of the Goutte d’Or — the dense, working-class landing spot for each new wave of immigrants to the city, a place where African wax stores and tailors for boubous compete with boulangeries and bistros among the crowded streets.

The tournament was one of many around Paris inspired by the 2019 edition of the Africa Cup of Nations, or Coupe d’Afrique des nations in French, the continental competition typically held every two years. The events have become so popular that the finals of one in Créteil, a southeastern suburb of Paris, were broadcast on Amazon Prime last summer.

In the Goutte d’Or, Mamoudou Camara’s principal aim wasn’t to shine a positive light on immigration and community spirit in his neighborhood, which is tucked behind the Gare du Nord — Europe’s busiest train station — and is among the city’s most impoverished, gritty and diverse areas. He was just thinking a tournament might help his friends survive the hot nights during Ramadan. He raised the idea on Snapchat, and by the end of that evening in summer 2019, six teams had registered. A day later, there were six more.

Instead of holding the event in a far-off stadium, Camara and his friends decided to host it in their childhood nest, the mini court in the center of the urban park where they spent their summer nights and weekends, battling over a ball and rounds of Coca-Cola or Fanta. (The loser paid.)

It offers a very different atmosphere than the marble statues and the manicured flower beds of the Tuileries and Luxembourg gardens. On game nights, the park, Square Léon, is buzzing with older men crowded around checker tables, little kids clambering up playground equipment and older women in West African dresses selling bags of homemade doughnuts and slushy ginger drinks that both tickle and soothe the throat.

Just before the final match starts, a tambour player beats out rhythms.

“In our neighborhood, we have all nationalities,” said Camara, 26. “We are proud to say we are multicultural.”

Around 30 percent of the 21,000 residents in this neighborhood were immigrants or foreigners in 2019, according to France’s national statistics institute.

Sixteen teams registered this year, the event’s fourth edition, to play 31 games over three weeks. On this June night, we are down to the finals. The Ivory Coast, a veteran team that won the inaugural tournament in 2019, is back in its orange and green jerseys, trying to reclaim the title. Challenging them is Mauritania — a team packed with young players, many of them semiprofessionals, wearing yellow and brown. The jerseys were created by a celebrated local designer who collaborates with Nike, and who has been invited to the presidential palace.

It is just one sign of how the tournament has matured. This year, the neighborhood city hall provides a small grandstand on one side of the court. Everywhere else, spectators stand, claiming their spots a good hour before the game begins.

By the time the referee blows his whistle, we are standing eight rows thick.

The court measures just 25 meters by 16.5 meters — about 82 feet by 54 feet — roughly one-seventeenth of FIFA’s recommended field size. It is framed by a low concrete wall, topped by a tall chain link fence.

The confined area makes for an intense game of precision, tight tricks, bursts of speed and a blasting ball that echoes against the walls and crashes into the fence every few minutes.

This is soccer by inches, with a team losing and gaining the ball within seconds.

Camara and other organizers devised the rules: five players per team on the court; no offside; corner kicks are thrown in; any foul after the fifth within a half results in a penalty kick; and games last 30 minutes to an hour, depending on their importance.

Two people livestream matches, and another camera is rolling for the referee to review plays.

The first year, all players had to be locals, but the rules have since loosened, allowing players from elsewhere to participate. But those who grew up competing on the court quickly reveal themselves by using the side walls to their advantage, bouncing passes around defenders to their teammates and back to themselves.

Martin Riedler, who three years ago formed the tournament’s French team, compared it to a boxing ring.

“You have to be on your toes the whole time, which makes the experience so intense,” said Riedler, who attended Santa Clara University in California on a soccer scholarship. He has packed his team with elite players who can hit the cross bar from the halfway line of a full field, but who also find the arena overwhelming. “You know you won’t sleep at night after a game.”

Players slam each other to the turf, then pick one another up. They continually battle against the wall, so close that a spectator might graze them through the fence. They offer up-close renditions of spectacular maneuvers, flicking the ball over their opponents’ heads and spinning it around their feet. That is one of the beauties of a small court, the referee Bengaly Souré tells me. It’s a compression chamber of technical plays.

“There’s no space, but they create space,” he said.

When a player jumps and kicks the ball into the net midair, Souré turns to the fence and expresses his admiration.

The crowd is part of the fun. Spectators shout their observations over the sounds of African beats, booming from loudspeakers. It is agreed that the player wearing No. 7 for Mauritania — who plays for a team in Italy — is a dangerous force. And though the Ivory Coast falls increasingly behind, the game could turn at any moment.

“I’ve seen a team that’s losing 4-1 make a comeback,” said Makenzy Kapaya, a 37-year-old artist who grew up in the Goutte d’Or but later relocated to a less cramped apartment elsewhere. Like many in the crowd, he has returned to watch the games and to reunite with childhood friends.

“If you have problems, people will help you here, no matter what your origins,” Kapaya said.

The Goutte d’Or, a dense, working-class area, often makes news for unflattering reasons — drugs, prostitution, violence. The library closed for months three years ago because employees said they had been repeatedly threatened by dealers selling near its doors. Following the fatal police shooting of 17-year-old Nahel Merzouk this summer and the subsequent protests across the country, the local police station was attacked.

Éric Lejoindre, the mayor of the 18th arrondissement, pointed out that local volunteers had been quietly helping with homework, cooking and housing for years. A group of therapists in the Goutte d’Or hold regular listening sessions, setting out chairs in an abandoned lot for passers-by to unload their burdens.

For all its problems, the neighborhood has huge heart, Lejoindre said.

“Locals know it, but sometimes we need it to emerge in a spectacular fashion,” he said. “For me, CAN is one of those moments when the neighborhood can revel in being a bit exceptional.”

After halftime, the Ivory Coast players rally, bringing the score to 9-7. But then Mauritania yanks the plug from their energy and dreams. As the sky dims into an inky night, and spectators hold up their phones as lanterns, Mauritania scores again. And again. And again. Boom, boom, boom. The players start to do little dances after each goal.

When Souré blows his whistle for full time, a crowd surges onto the tiny court to embrace the young Mauritanian team in a squealing cyclone of joy.

Camara, who will take a few weeks off before beginning preparations for next year’s event, said he was continually surprised by how much joy the little tournament had brought to the neighborhood. At a time when anti-immigration sentiments are growing and identity politics are flaring in France, he said he considered it a unifying event. “We thought we were just starting something for fun,” he said, “but we created something bigger.”

Red and white fireworks burst above the little park in the heart of the Goutte d’Or. The celebration will continue for hours.

Juliette Guéron-Gabrielle contributed research from Paris.