In the Kotez neighborhood of Belgrade, Serbia, sandwiched between a minimum-security prison and an arson-stained mental institution, sits an open yard with an outdoor basketball court.

Rustem Smailagic, an electrician who worked seven-day weeks to provide for his wife and two children, used to spend lunch breaks there rebounding for his young son, Alen. After a while, inmates and psychiatric patients — free to roam the yard during recreation hours — would filter toward the court to watch the gangly primary-school student shoot jump shots.

They offered Alen a reminder of what he could face if he succumbed to Belgrade’s web of drugs and violence. He had been born in 2000, shortly after nine years of near-continuous war that broke up the old country of Yugoslavia along the fault lines of religious tensions and nationalism, leaving the capital city of Belgrade — once an oasis of cafes and nightclubs — in a mafia state as it tried to rebuild its economy and tourism.

Rustem had returned to Belgrade to raise a family after seeking refuge in Russia during the height of the conflict. He made it his job to shield Alen and his younger sister, Adela, from many of postwar Serbia’s harsh realities. But that court, between the prison and the mental institution, was just a short walk from their modest apartment. Rustem didn’t have time to venture much farther during his lunch break.

When Alen was 12, a few inmates convinced his father to let him keep shooting when Rustem returned to work. Watching the preteen with huge hands and agility that belied his height provided a measure of entertainment in their otherwise bleak days.

“They told my dad, ‘Leave him with us; he’s going to be safe,’” Smailagic said recently through an interpreter. “They really liked me, and they made sure no one touched me.”

Just two years ago, while toiling in the rec-league-size gymnasiums of Serbia’s third division, he considered the NBA little more than a daydream. Now, less than two months removed from his 19th birthday, Smailagic — out indefinitely with a sore ankle rolled in Wednesday’s practice — enters his rookie season with the Warriors as the organization’s most intriguing long-term project.

Although he is still acclimating to the U.S. after a season with Golden State’s G League affiliate in Santa Cruz, he boasts a mix of size, skill and confidence that has some comparing him to fellow Serbian and MVP candidate Nikola Jokic of the Denver Nuggets.

“He’s a player that, right now, would be a freshman in college,” said Warriors player-development coach Aaron Miles, who coached Smailagic in Santa Cruz last season. “To say Alen has a bright future would be an understatement.”

On a sunny afternoon in mid-September, Smailagic (pronounced SMI-la-geech) curled his 6-foot-9, 216-pound frame behind a corner table at an upscale seafood restaurant overlooking San Francisco Bay. As Smailagic scanned the menu, Warriors President Rick Welts, having just finished a lunch meeting at a nearby table, stopped to introduce himself.

When Smailagic told him, “I’m Alen,” Welts chuckled and said, “I know who you are.”

The Warriors have been tracking Smailagic for more than two years, long before any other NBA teams were aware he existed. To ensure it could keep Smailagic in its system, Golden State gave the New Orleans Pelicans two future second-round picks and $1 million to move up two spots and draft him 39th overall in June.

After saying goodbye to Welts, Smailagic asked a team staffer whether the restaurant had calamari. In the half-year he lived in Santa Cruz, he became infatuated with the fried-squid appetizer, one of several new culinary favorites. Employees at the Chili’s he frequented for the strawberry lemonade and queso dip knew him so well that he gave them tickets to games.

Less than a year since he touched down in the U.S. for the first time, Smailagic looks the part of a normal — if quite tall — American teenager. His free moments are spent thumbing through Instagram on his iPhone. Although his English is conversational, Smailagic — “Smiley” to his teammates — communicates largely through sheepish shrugs and smiles. His ever-present slouch suggests he is not yet comfortable with his long build.

While back home in Belgrade this summer, Smailagic passed six of the 10 exams required for his high school diploma. The other four will have to wait. They conflicted with his offseason workout schedule with the Warriors, who will pay him $6.1 million over the next four years, hoping he blossoms into the type of versatile power forward so prized in today’s NBA.

“I’ve thought for a while now that I could do something with basketball, but not anything this big,” said Smailagic, who is still in awe that he shares a roster with Stephen Curry, Draymond Green and Klay Thompson. “If someone had said, ‘You’re going to play in the NBA at 19,’ I would’ve thought they were crazy.”

Smailagic learned early not to want for things. Little more than a year before he was born, NATO bombed his homeland to force Serbian leader Slobodan Milosevic to withdraw his security forces from Kosovo, killing more than 500 civilians in an 11-week assault.

Ashen Communist-era buildings still dot Belgrade. As soon as his son was old enough to understand, Rustem told him about the days without food and the persistent fear that, one dark night, men would arrive at his doorstep with AK-47s and force a young Rustem into a war he didn’t support.

In 1994, Rustem fled northeast to Russia and found work as an electrician. Once the bloodshed stopped three years later, he moved back to Serbia, where his parents set him up with Nermina, a young woman from Sanjak, a rural region bordering Montenegro. When the couple had their first child, Rustem and Nermina vowed to protect him from the bigotry that had fueled nearly a decade of tumult.

Alen, a Serbian Muslim, befriended schoolmates from different religious and ethnic backgrounds. When he was 7, Rustem took him to KK Beko, a basketball club a five-minute walk from their high-rise, to keep him off the street. In KK Beko’s dilapidated gymnasium, the boy learned the game: how to spread the floor, make the extra pass and not complain when a hard foul went uncalled.

At the seafood restaurant in San Francisco, Smailagic stopped munching calamari and sipping lemonade to point out a scar snaking up the right side of his neck, a lasting reminder of the time four years ago when an opponent with long fingernails clawed him during a club game as he attempted a dunk.

“The games over there were way rougher than here because they were fighting for real,” he said. “If you say or do the wrong thing, you might get beat up, or worse.”

Santa Cruz Warriors general manager Kent Lacob was a bit confused when, in May 2017, he arrived at a cramped gym just north of Belgrade. Weeds poked through the tile floors. Soccer goals stood along the baseline. In the back, an acting class rehearsed on a small stage.

Lacob and Warriors international scout Kosta Jankov had come there on a day off between Serbian league semifinal games as a favor to one of Jankov’s friends, who wanted Lacob’s opinion on whether his son could play Division I basketball stateside. But as the workout progressed, Lacob couldn’t take his eyes off the 6-6 16-year-old with textbook shooting form, elite court vision and a smooth dribble.

Still an unknown to Europe’s top clubs at that point, Smailagic hadn’t played at any level higher than Serbia’s third division, in which he dominated his shorter, less athletic peers. Yet in August 2018, Lacob told Smailagic’s agent that the Warriors were interested in making his client the youngest player in the history of the G League, the NBA’s developmental league.

In late September, over a dinner of cevapi (skinless lamb and beef sausages) and burek (filo pastries loaded with meat and cheese) at the family’s one-bedroom apartment, Santa Cruz player-development coach Anthony Vereen told Rustem and Nermina that the G League offered their son the chance to boost his NBA draft stock by playing against grown men striving for roles on the sport’s highest level. As the weight of his words sank in, Nermina began to cry.

Smailagic had left his family only once, for a tournament in Poland with Serbia’s under-16 national team. Rustem and Nermina couldn’t afford to visit him in Santa Cruz.

“I really felt the seriousness of bringing someone over who’d barely left his own home,” Vereen said. “I just let them know I would try to take as good care of Alen as I could, that I would treat him like someone in my own family.”

Five weeks later, when Smailagic arrived at the Santa Cruz hotel room he would call home for the next five months, he was ecstatic to learn he wouldn’t have a roommate. Smailagic had shared a room with his parents and younger sister, two years his junior, for as long as he could remember.

Vereen got him a debit card and an iPhone, taught him how to shop for groceries and introduced him to a few restaurants, most notably Chili’s. Smailagic tried peanut butter for the first time, learned curse words from rap songs his teammates played at practice, and stayed up late peppering Vereen with questions about American history.

In December, while four-time All-Star DeMarcus Cousins was in Santa Cruz for a rehab assignment, Smailagic refused to let anyone else guard him. After dunking on Smailagic, Cousins shouted, “You can’t stop me — you’re probably a virgin!”

“What’s a virgin?” Smailagic asked a teammate.

On the night the Warriors drafted Smailagic, Lacob embraced him at the team’s headquarters and told him, “Last season was the introduction, and now we’re at chapter one.” Smailagic flashed his immense potential in the G League and at Summer League, but he must add muscle, stop reaching in on defense and learn how to play off the ball if he wants to earn meaningful NBA minutes.

Those who witnessed him adapt to a new culture, language and level of play on the fly last season believe he is up for the challenge. Smailagic can’t drink legally, but team officials praise his maturity.

While Smailagic was with Santa Cruz, he sent most of each paycheck he earned back home to his parents in Belgrade. Now, fresh off signing his rookie contract with the Warriors, he is planning to buy an apartment in the rural area of Sanjak so that Rustem and Nermina finally can escape the rough life they worked so hard to shield him from.

“For 30 years, my dad worked seven days a week and had just 15 days a year off,” Smailagic said. “He’s retired now, and I told him I’m going to get mad if he still works.”

Connor Letourneau is a San Francisco Chronicle staff writer. Email: cletourneau@sfchronicle.com Twitter: @Con_Chron