British athletes hit the medal mother lode in Rio, defying experts who predicted a post-London slump for Team GB.
Britain ranked second in the final medal count with 27 golds, placing it ahead of sports powerhouses China, Russia, Germany, Japan and France.
Many observers have been caught off guard by the U.K.'s success -- Rio was supposed to a comedown from four years ago, when Team GB rode its home field advantage to 65 medals in London.
There is one big reason why Team GB is doing so well: The country's ruthlessly efficient -- but controversial -- sports funding program.
U.K. sports officials base their funding decisions on whether a specific program is likely to win medals, and whether they produce on the biggest stage. It's a system leaves little room for sentimentality or excuses.
If a sports program fails to produce the expected number of medals at the Olympic Games, their funding is cut. Meanwhile, programs that exceed their quota are rewarded with additional money.
For example, Britain's cycling and boxing programs had their funding increase after London. Wrestling and table tennis were among the losers.
To the dismay of critics, funding for basketball, a popular sport in the inner cities, was eliminated entirely after both men and women squads failed to meet performance targets.
Related: What's next for Michael Phelps?
The chair of U.K. Sport, Rod Carr, said this week that funding cuts can give struggling sports programs extra incentive to do better.
"In the early 2000s, [the gymnastics team was] in a pretty low state. They hadn't had a good Games at Sydney, and their funding was cut on behalf of that," he told BBC Radio. "They went right back to basics, they disassembled their program and looked at what was working, and what wasn't, and then built it up again."
More money means better equipment, coaching, facilities and, in the long run, athletic results.
Related: How the world's fastest man built a business empire
The performance-based funding system was implemented in the wake of Britain's disastrous showing at the 1996 Atlanta Olympics. That year, Team GB won a single gold medal and finished 36th overall.
Budgets have increased substantially since then, with funds coming from government coffers and the U.K.'s National Lottery. During the four-year cycle leading up to Rio, some 275 million pounds ($360 million) were doled out.
Rowing is the top funded sport, followed closely by cycling, which has already produced 11 medals in Rio. Both programs receive more money than the country's swimming and track and field teams.
It's hard to argue with the results. But critics still argue that more a more holistic approach should be taken.
Carr, meanwhile, is already looking ahead to more medals at Tokyo 2020.
"What we're not going to do is invest ... in sports that frankly right now, stand little chance of actually competing in Tokyo," he told the BBC.