No one is really sure who put up the first basketball hoop in Rio Venado. Big chutes of mud wash down the mountainsides when it rains, so it wouldn’t have been a good place for a soccer field anyway.

The town has five basketball courts today but only about 400 residents, most living in brown mud-brick huts along a steep dirt road. One court functions as Rio Venado’s town square, and it is where boys and girls learn the fundamentals of being an ethnic Triqui: speaking the Triqui language, wearing the elaborately woven huipil dress (for girls) and playing hoops, usually barefoot.

(Watch some highlights from the Indigenous Basketball Association Mexico games.)

“If someone steps on your toes, you just keep playing,” said Melquiades Ramirez, a 10-year-old boy who goes by the nickname “Kevin Durant” but who, at 4-foot-1, is considerably shorter than his NBA idol.

The Triqui (like “TREE-key”) are among the dozens of indigenous peoples who live in the pine-forested mountains of southern Mexico’s Oaxaca state, and for the past few decades, growing up here has involved fairly predictable rites of passage. Teenage boys would follow their fathers and brothers north to pick grapes in California and berries in the Pacific Northwest, saving their money for a patch of land, a bride and maybe even a used pickup. Girls can be sold to suitors at age 13 or 14.

But in recent years, crossing the U.S. border has gone from difficult to dangerous to nearly impossible, and this has thrown the Triqui world out of whack. Fewer Triquis go north. Those already on the other side are stuck there.

The ones who remain behind — often grand­parents and children — live by hard-luck farming and government handouts.

What’s left is basketball.

“Their hunger and poverty is their potential,” said Sergio Zuñiga, the tall, soft-spoken outsider who the Triquis call “Coach.”

“It is their way out,” he said.

Not likely to the NBA. The tallest known Triqui is about 5-foot-10. But Zuñiga is in no hurry to burst the hoop dreams of the kids under his care.

His goals are more modest, although still a long shot for a boy or girl from Rio Venado. Learn to read and write Spanish. Attend high school in Oaxaca, the state capital, and maybe even go on to college. Have career options beyond sneaking over the U.S. border or sharecropping a cornfield.

Basketball is just the bait.

“These kids are invisible in Mexico,” Zuñiga said. “They grow up eating one, maybe two meals a day, and sometimes that’s a tortilla with salt or a tortilla with some wild herbs.”

“We are trying to bring them out of the shadows,” he said.

A former Mexican-league professional basketball player from a ­middle-class Mexico City family, Zuñiga, 43, founded the Mexican Indigenous Basketball Academy three years ago with his wife, who is from Oaxaca.

The state is one of the country’s poorest, and the sport was introduced by U.S. missionaries decades ago.

Basketball — not soccer — became a gravitational center in remote indigenous villages whose ties to the rest of Mexico are frayed by centuries of discrimination and neglect.

Zuñiga lived in Rio Venado for 18 months to gain the trust of parents and elders, and to dispel the rumors that he was a spy for the Mexican government or a con man out to steal the village’s children.

Since then, Zuñiga has won modest financial support from state authorities, especially the wife of Oaxaca’s governor.

Her backing helped him bring a team of Triqui kids in July to an international youth tournament in Orlando, where they beat a few U.S. teams and stunned organizers by asking to play barefoot.

The kids had never been on an airplane before, let alone to another country.

“Disney World,” said Daysi Martinez, 12, when asked what she liked about the United States. “I saw a princess.”

‘Brought up to be afraid’

This month, Zuñiga took a team to another international competition, in Argentina, with trips to the Dominican Republic and Houston up next. Getting passports for the kids has been a struggle, since many of their parents left for the United States years ago and their grandparents in Rio Venado speak little or no Spanish — only a tonal dialect of Triqui used by about 10,000 people.

Parents who have worked illegally in the United States have become some of Zuñiga’s best allies. A few have even defied Triqui taboos to allow their daughters to play on Zuñiga’s teams, attend school in Oaxaca city (an eight-hour bus ride from the village) and travel abroad — all of which are said to diminish a girl’s value in a culture in which polygamy is still practiced.

“Triqui women are raised to be shy and silent,” said Daysi’s mother, Feliciana Martinez de Jesus, whose parents took her out of school in third grade. “They are brought up to be afraid.”

Feliciana was sold for $1,500 as a young girl. Her parents disapprove of their granddaughters playing basketball and going to school so far from the village.

“They think the girl should stay at home and never leave,” said Daysi’s father, Marcelino, one of the few Triquis who does not avert his gaze when speaking to an outsider. “All they’re thinking about is the money.”

Marcelino, 35, left Rio Venado at age 16 with his father to pick raspberries on farms in Washington state. He returned a few years later with enough money to give Feliciana’s parents.

Despite the objections from his wife’s family and his parents, Marcelino has insisted that the girls stay in school — even forcing them to return to the city when they get weepy with homesickness for the village. “This is an opportunity that won’t come along again,” he said. “I don’t want them to forget their culture and where they’ve come from, but I want them to see that there’s a bigger world out there, with other ways of thinking and seeing things.”

It is a lot for a kid from Rio Venado to handle.

The town is walled in by steep, misty green mountains on three sides, and outsiders — including police and government officials — can drive up only with the permission of village authorities. The result is a kind of Triqui Brigadoon, where kids spend their days running along the basketball courts or playing in the river and no one seems too worried about the crime or drug violence that has upended rural life in other parts of southern Mexico.

On a recent afternoon, barefoot kids crowded the court in the center of town. When drenching rains came, they splashed through the puddles, then went back to playing basketball once the sun returned. With their teachers on strike in Mexico City, they had not gone to school in two months, so every day had been spent on the court.

“I didn’t get much of an education here,” said Silvino Martinez, one of many Triquis in Rio Venado with that surname. “I never learned to add, or to express myself in Spanish. When I would go to northern Mexico for work, they made fun of the way I talked, so I just learned to stay quiet.”

Silvino found work in California’s Salinas Valley picking asparagus and zinfandel grapes, playing in pickup games with migrants from other basketball-crazed Oaxacan ethnic groups on the weekends.

His 13-year-old son, Leonardo, attends school in Oaxaca city, playing for Coach Zuñiga. “I want him to learn things about the world,” his father said.

Other coaches take notice

There are rules for the Triquis who play on Zuñiga’s teams: They must get good grades, continue speaking Triqui and agree to help their parents with chores whenever they are back in Rio Venado. Slackers are sent home to the village as punishment.

The kids cram into a group home in Oaxaca, sleeping on floor mats and storing their clothes in duffel bags. Most of their uniforms and shoes are donations, and Zuñiga does not make them stop playing barefoot if they don’t want to.

His teams specialize in an up-tempo, relentless style of play that compensates for their diminutive size, and their tournament victories against kids from other parts of Mexico have caught the attention of basketball coaches elsewhere. Two of Zuñiga’s assistants have recently landed coaching jobs at high schools in other states, blazing a new career path for Triquis.

But a faraway job is a bittersweet path for kids from Rio Venado, where basketball is both cultural glue and a ticket out. A life tending corn and patting out tortillas over a smoky fire is not easy for someone who has known the wonders of Disney World.

“I think basketball is a good thing,” said Lorenza de Jesus, a mother of 10 with rough hands and long gray hair tied back, having just returned at dusk from the fields with her husband. Their youngest daughters had spent the day playing three-on-three on the town’s main court, as skilled as any of the boys.

If the girls want to leave the village and live elsewhere, good for them, de Jesus said — as long as they come home to visit and send money to the family.

“We’ve never seen them play,” said their father, Cirilo. “Are they any good?”

Gabriela Martinez contributed to this report.