Qatar's Marko Bagaric, left, tries to score past France's Ludovic Fabregas during the men's preliminary handball match between France and Qatar at the 2016 Summer Olympics on Tuesday in Rio de Janeiro. (Ben Curtis/AP)

Marko Bagaric, a 6-foot-7, shiny-headed bullet of an athlete, stood alongside his teammates before the start of their Olympic opener. The Croatian-born handball player remained silent during the playing of Croatia’s national anthem. That was probably the toughest part, as Bagaric was wearing the uniform of a different country.

“Ah, but what can I do?” Bagaric told reporters later. “Qatar gave me the opportunity to play in the Olympic Games. It is the dream of any sportsman.”

Representing Qatar at these Rio de Janeiro Games, Bagaric had to compete against his countrymen — former teammates, former roommates even. It’s hardly an unusual dilemma here for members for the Qatar Olympic team. The wealthy Middle Eastern country is smaller than Connecticut and has fewer people than Chicago, but it managed to send 39 athletes to these Olympics, its most ever.

Here’s the rub: At least 23 were born outside of Qatar and transplanted — recruited in many cases — to help the country flourish athletically. The athletes hail from at least 17 countries and five continents, many of them lured to Qatar by perks and salaries far higher than what their home countries could offer.

Cherif Younousse Samba, left, of Qatar during the preliminary men’s beach volleyball match between Qatar and Spain at the Rio Olympics (Alejandro Ernesto/EPA)

Qatar is a country where the vast majority of the population is comprised of foreigners who have relocated there for work, taking up temporary residency to ride the Persian Gulf region’s economic wave. In that sense, its athletic evolution isn’t too far out of bounds. Competing at these Olympics, Qatar has runners from Sudan and boxers from Germany, a beach volleyball player from Brazil and a table tennis player from China.

“In the past, representing China, it was hard for me to get a place in an international tournament, let alone the Olympic Games,” Li Ping told the International Table Tennis Federation’s website in April. “I really treasure this opportunity.”

Perhaps nowhere is the mercenary approach more pronounced than in the handball arena, where Qatar is fielding an Olympic team for the first time. Of its 14 players, 11 were recruited from other countries. Even their coach, Valero Rivera, is from Spain. Handball is a team sport, especially popular in parts of Europe, and Qatar was able to lure some of the game’s top players.

Hassan Mabrouk previously competed for Egypt in the 2008 Beijing Olympics. Bertrand Roine helped his native France win gold at the 2011 handball world championships. Rafael Capote, originally from Cuba, was in the running last season for the International Handball Federation’s player of the year award.

This League of Nations approach is not without its critics. “Qatar are creating a fake team,” Christer Ahl, a high-level referee, told the London-based Sunday Telegraph. “They are putting together players with no apparent connection to the country and are kicked out if they don’t contribute to a medal or other success. They become some sort of all-star team.”

After opening the Olympic tournament with a win over Croatia, Qatar was beaten handily, 35-20, Tuesday by France, the gold-medal winners at the past two Olympics. French player Valentin Porte said the “spirit” of Qatar’s team, compared to France’s, played in a role in the blowout victory.

Li Ping of Qatar reacts against during a third round table tennis match at the Rio Games. (Erik S. Lesser/EPA)

“We play for the love of the sport,” he said. “And they play for the money.”

But Qatar still plays within the rules. Qatar is able to grant citizenship as it sees fit, and International Olympic Committee rules simply require any athlete who’s represented one nation in international competition to sit out three years before representing another.

“It’s legal, so it’s absolutely fine,” said German player Finn Lemke. “No problem. But they’re good — that’s the problem.”

Every four years, many countries take advantage of the same loopholes to boost the talent of their Olympic squads. Dozens of athletes who were born, raised and trained in the United States are competing in Rio de Janeiro under the flags of other nations. But Qatar’s recruitment of foreign-born athletes is among the most brazen. In 2000, for instance, Qatar fielded an entire weightlifting team comprised of Bulgarians, helping the athletes change both their citizenship and their names so they could compete at the Summer Olympics in Sydney.

“We changed their names so they sound Arabic because their names are hard to pronounce,” Yousef Al-Mana, the president of the Qatar Weightlifting Federation, told the Orlando Sentinel at the time. “If you bring something good to Qatar, then you will get citizenship, too. This is a prize for you if you do something good for us.”

Since then, Qatar’s Olympic team has more than doubled in size. In 2012, the small country took only 12 athletes to the London Games. At the IOC’s urging, they included four women on that team for the first time. At these Games, only two of the 39 athletes are women: sprinter Dalal Mesfer al Harith and swimmer Nada Arakji, who also competed at the 2012 Olympics.

While the equestrian team here features some native Qatari competitors, they all live in the Netherlands, where they train as a team. (Not as surprising: Their horses aren’t from Qatar either, hailing from equine-friendly locales such as Belgium and Germany.)

Some might see Qatar’s athletic ambitions as a chance to cash in, but it also represents an Olympic outlet for athletes who fail to make their home country’s national team. Sprinter Femi Ogunode was dropped from major events by Nigeria’s national team leading up to the 2008 Beijing Games when he received an email from Qatar inviting him over.

“I said yes but told them I had no funds to move,” Ogunode told the Nigerian news website Premium Times last year. “They told me to send my passport and I was given passage to Qatar. The rest as they say is history, as I became a Nigerian-Qatari.”

Despite its best efforts, Qatar has never won an Olympic gold, never had an athlete on the medal podium as the anthem played.

At least at the Rio Games, some of its Olympians will feel connected to the host nation, if not their adopted one. Qatar’s beach volleyball team is comprised of Cherif Younousse Samba of Senegal and native Brazilian Jefferson Santos Pereira, who was born and raised in Rio de Janeiro and is playing on familiar sand.

For much of the Qatar team, there’s nothing foreign about competing in a foreign country.

“I’m feeling like I’m home in my country,” Younousse Samba said.

Adam Kilgore contributed to this report.