Mexican boxer Misael Rodríguez, left, takes on Waheed Abdulridha Waheed Karaawi of Iraq in Rio de Janeiro on Aug. 9. (Mario Ruiz/EFE)

MEXICO CITY — Mexican middleweight boxer Misael Rodríguez beat an Egyptian opponent this week for a spot in Thursday's semifinals, guaranteeing himself at least a bronze medal and breaking Mexico’s medal drought at the Summer Olympics.

But no sooner had he stepped out of the ring in Rio de Janeiro on Monday than social media swung into action, spreading photos of Rodriguez and his boxing teammates boarding beat-up buses in Mexico City 11 months earlier to raise money from riders for their trip to the world championships.

Mexico has endured a miserable Olympics, with scandal overshadowing success and some on social media taking the opportunity to point to poor performances in Rio as reflections of mediocrity at home. The country of 120 million can't boast a single medal winner so far, although Rodriguez will be on the podium later this week.

Much of the discontent has centered on the country’s sports commissioner, Alfredo Castillo — a confidant of increasingly unpopular President Enrique Peña Nieto, and controversial for his role putting out the president's political fires.

Castillo was quick to congratulate Rodríguez, tweeting, “Our athletes have given it their all in #Río2016, today Misael's efforts are coronated.”

Mexicans responded with sarcasm, while media outlets dutifully dug up old Castillo tweets accusing the boxing federation of “dragging down” Mexican sports and accusing its leaders of living the high life at the expense of its fighters.

In the absence of medals, Castillo has stolen the spotlight. The commissioner has made himself an easy target, too. He brought his girlfriend to the Games, and photos appeared of the pair kissing and cavorting at official events. It brought immediate criticism from athletes. “There easily could have been a trainer or physiotherapist who really needed [the girlfriend's] credential,” archer Aída Román, a medalist in the London Olympics in 2012, told Mexican media.

Stories surfaced, too, of Castillo taking in a Novak Djokovic tennis match instead of a competition involving Mexican athletes. Castillo later accused the judges of having it in for Mexico after a pair of synchronized divers were denied a re-dive, which they requested saying they were distracted by photographers’ flashes. #DesmadreOlimpico (Olympic mess), subsequently trended on Twitter.

“The reprisals for not handing over 15 million dollars are here," Castillo tweeted. The amount referred to a fee that FINA (swimming’s governing body) imposed after Mexico backed out of hosting the 2017 world swim championships.

Controversy, not competition, has consistently topped Mexican news from Rio — not an unusual occurrence, say some observers.

“We’re always talking about everything, except for sports,” says Héctor López Zatarain, a sports marketing consultant in Guadalajara.

Mexico seldom overachieves in the Olympics — and Mexicans have marveled at how Michael Phelps has won more gold medals than their country has in its entire history.

But the men’s soccer squad winning gold in 2012, along with steady success on the Under-17 level were supposed to signal the emergence of a new generation of athletes overcoming old stereotypes, such as the idea that Mexicans don't work well in teams. The squad’s early exit in Rio — it lost 1-0 to South Korea last Wednesday, after an embarrassing earlier game in which it trailed Fiji 1-0 at halftime (before winning 5-1), seemed to suggest a regression to the old ways of players not performing up to their potential.

Interest in the Rio Games has also been underwhelming — more so this year as telecom mogul Carlos Slim outbid the usual alliance of the big two broadcasters, Televisa and TV Azteca, and put the Olympics on cable and streaming services. The broadcasters have responded by treating the Olympics as a nonevent, while the soccer squad’s elimination diminished interest further.

“It’s soccer first, then all the other sports,” says Alejandro Aguerrebere, an analyst with TVC Deportes.

Issues unrelated to performance have consistently captured attention, including ratty uniforms, petty politics among Mexican officials and gymnast Alexa Moreno being body-shamed. ESPN went as far as to quote analysts saying the woes summed up the state of the country.

“I think Mexicans are overreacting,” says Rodolfo Soriano-Nuñez, a sociologist in Mexico City. “They do not realize how hard is to be fourth, fifth or even 10th worldwide.”

He sees domestic politics driving the discontent.

“The reaction is more about the rejection of Peña Nieto’s government” — represented by Castillo — “than about the athletes’ performances, with the exception of men’s soccer,” which underachieved despite being backed by billionaires, the sociologist said.

Castillo came to the national sports commission, Conade, in April 2015 after a stint in Michoacán state, where he was sent by Peña Nieto to subdue vigilantes, who took up guns to fight off a drug cartel. Castillo quickly was dubbed “Viceroy,” as critics accused him of acting like the de facto governor and going after local leaders critical of the government.

His arrival at Conade came with controversy. Castillo accused the country’s sports federations of operating with opaqueness — which brought accusations of political meddling.

“Those responsible for the subject of performance are the federations,” Castillo recently told MVS Radio. “Conade is a travel agency” for them.

Sports analysts say both sides share the blame.

“It’s all about power and money,” Aguerrebere says of the dispute, adding the outcome would be similar regardless of who led Conade. “Athletes are the least important people in this.”

Whether Castillo will be called to account for Mexico’s Olympic perform remains uncertain, though political parties have called for him to appear in Congress. Ex-president Vicente Fox called for Castillo’s resignation.

Some have suggested that Castillo has shown an unflattering side of Mexico’s elite — one in which connections and cronyism count more than merit or accomplishment.

“He’s the typical mirrey,” says author and academic Ricardo Raphael, referring to a term given to the country’s entitled elites — people playing by their own rules and more prone to enjoying privileges than succeeding in competition. “People like him are the owners of this defeat,” Raphael says.

Read more:

The Olympics are a test that Brazil has yet to pass

How judo champion Rafaela Silva turned the City of God to gold