Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

China's state-run sports academies have long produced a stream of Olympic successes, but an evolving middle class may be slowing the mighty machine's churn of medals.

Putting young athletes through the grinder at so-called "athlete factories" was for decades a winning strategy: China has won more than 500 medals since returning to the Olympic fold in 1980 — including a haul of 51 golds when Beijing hosted the 2008 Games.

Young gymnasts take part in a training session for four to seven-year-olds at a sports school in Jiaxing, China, in August 2010. Jie Zhao / Corbis via Getty Images file

But through 11:15 a.m. ET on Sunday, there were just 70 visits by Chinese athletes to the podiums in Rio — down from 88 in London — signaling the old system could be struggling to keep pace with a changing China. The country was third overall in gold medals — with 26— behind the U.S. (43) and Great Britain (27). China boasted 38 champions at the 2012 Games.

China has a population of at least 1.4 billion. Great Britain has been buoyed by investment in infrastructure and training linked to hosting the London Olympics — but is home to only 65 million people.

“Before the 1980s, China had limited working opportunities for its people,” explained Dong Jinxia, director of the Peking University Research Center for Gender, Sports and Society, “But with rapid economic development, especially after the 1990s, there are more jobs in China. And with the one-child policy, parents became unwilling to let their children endure the hardship of training.”

With the growth of the country’s middle class, enrollment at state sports schools has dropped so significantly that even top-level academies are being forced to cancel or consolidate training programs.

The number of sports schools is down to 2,183 from a peak of 3,687 in 1990, according to government figures.

Beijing’s Shichahai Sports School is one cog in the national sports strategy that until now has churned out 95 percent of the country’s champions. For years it was considered a key production line of top-rated athletes and its gymnastics team was famous for producing gold-medal performances.

While posters of China's Olympic stars adorn the walls, vice principal Zhang Jing told NBC News the school's focus has shifted to more “comprehensive development” aimed at ensuring students are preparing not only for competition but also for life.

Zhang Yuan Rong takes golf lessons at Beijing's Shichahai Sports School. NBC News

That has meant a transformation at the eliteacademy. The school no longer offers weightlifting or volleyball training programs; its legendary gymnastics facility is now an indoor driving range.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Zhang Yuan Rong takes golf lessons there three times a week. The 7-year-old told NBC News she does not care if she ever competes — then smiled as she shyly admitted she is “pretty good” at it.

“My parents play golf,” she said when we asked her why she took up the sport. “They told me no matter how old you get, you can always golf.”

That kids are playing sports for fun or fitness might not seem odd to many American parents, but in China it signals a sea change in the country's approach to the critical role of sports in life.

A Soviet-style training infrastructure was established in the 1950s as post-revolutionary China looked to earn a place in the world. Sport became a tool for the Communist government to rally national pride, and parents viewed the subsidized system as a chance for their children to prosper.

Since then, China’s strict training system often has been associated with agonized images of tearful children locked in grueling routines and being forced to live away from their families. The reputation is not unwarranted: Only after diver Wu Minxia won gold at the London 2012 Olympics she was she told of her mother’s long battle with breast cancer and the death of her grandparents over a year earlier.

“I wish I had a different life"

“We accepted a long time ago that she doesn’t belong entirely to us,” her father, Wu Yuming, told the Shanghai Morning Post at the time. “I don’t even dare to think about things like enjoying family happiness.”

Increasingly, the system has been criticized among Chinese for its failure to prepare athletes for what comes after competition. An estimated 80 percent of about 300,000 retired athletes have struggled with injuries, joblessness, or poverty, according to China Sports Daily, a newspaper run by the government’s Physical Education and Sport Committee.

“All of our focus was on training and competition to fight for the glory of our country,” former gymnast Zhang Shangwu told NBC New. At age 5, Zhang was living with his aging grandparents — who convinced his divorced mother the state-run sport system would care for him.

Recruiters visited and identified Zhang’s hands as being well-suited to gymnastics; by 9 he was training full-time at a school away from home.

Former gymnastics world champion Zhang Shangwu shows off his medals on the street in Beijing, China, in 2011. jhphoto / jhphoto - Imaginechina

Zhang performed well and won at the provincial and national levels, but ruptured his Achilles tendon while training for a spot on the Olympic team for the Sydney 2000 Games. The injury ended his career and eventually his financial support from China’s government. For the first time, at 23, he found himself on his own.

“I didn’t even know how to cook,” Zhang recalled. “I had to learn everything from the beginning. Athletes have little life experience.”

At first he worked at restaurants, delivering food and washing dishes. But he says his years of hard training made the long shifts unbearable.

Now 33, Zhang moves between cities selling bracelets near subway stations and says he often sleeps at fast-food restaurants.

He wears a Team China shirt and fake Nike sneakers; a worn-out photograph showing him at competition and sign about his past decorate his display. While he once performed for adoring crowds; Zhang now does handstands to attract customers on the street.

“I wish I had a different life,” Zhang told NBC News.

Cheng Fei, Deng Linlin, He Kexin, Jiang Yuyuan, Li Shanshan and Yang Yilin of the Chinese women's gymnastics team look on after winning the gold medal at the Beijing 2008 Olympic Games. Al Bello / Getty Images

Not all retired athletes in China are as destitute as Zhang. Many are rewarded with jobs, apartments, or subsidies — and some become celebrities, such as tennis star Li Na.

But since 2007, the state has had to direct at least $4 million a year toward welfare programs and social assistance for former athletes.

There are no official statistics on the number of student athletes currently in the state sport school system, though estimates range between 30,000 and 50,000. While figures are hard to come by, the number of athletes training for table tennis for example is estimated to have dropped by around 25 percent since 1987.

While the number of athletes entering the system is expected to fall even further, fears that China will lose its overall edge may be overblown, said Mark Dreyer, a Beijing-based sports analyst and commentator.

"China has 1.3 or 1.4 billion people. They are not going to have a shortage of athletes," he told NBC News. “If more people are choosing to do sports and actually enjoying themselves rather than enduring the pain of the training schools, that should create a larger pyramid of athletes. [And with] at least some of the old training techniques that have hardly been banished, medal-winning talent will still rise to the top.”

Chinese athletes lift Gao Jian, director of the gymnastics center of the State General Administration of Sport, as they celebrate winning the gold in the women's team final of the artistic gymnastics event at the Beijing 2008 Olympic Games on Aug. 13, 2008. FRANCK FIFE / AFP/Getty Images

China’s government still dedicates millions of dollars every year to its investment to maintain superiority at the highest levels. Each Olympic gold medal has cost China at least $7 million, according to estimates.

But the decline in dominance is evident in the medal tally from Rio and lower numbers of student athletes.

That has no bearing on Fu Yu, who aspires to one day compete for a medal in women's tae kwon do. She's undeterred by the training schedule to get there; six days a week at Shichahai.

“I long for school life at times,” the 19-year-old said. “[But] representing the country at an international competition would be the greatest honor.”