NOTE: If you’re looking for the medal count at the Tokyo Olympics for Team LGBTQ, click here.

The publicly out gay, lesbian and bisexual Olympic athletes in Rio outperformed expectations, with 25 of the 53 publicly out athletes winning medals. All told they accounted for 14 medals, when you combine multiple athletes on single teams (e.g., four out women played on the gold-medal-winning Team USA basketball team).

Those 14 medals beat every single country that criminalizes sex between people of the same gender. Jamaica, with 11 medals, was the closest such nation to catching Team LGBT. Most countries that criminalize gay sex fared very poorly in the Olympics. Iran, for example, won only eight medals; While 47% of the out LGBT athletes won medals, only 13% of Iranian athletes won medals.

Various notoriously anti-gay nations won zero medals, including Libya, Sudan and Uganda.

The LGBT athletes from Great Britain alone accounted for four medals, beating all of these countries that criminalize gay sex, and others like Nigeria (one medal) and Tunisia (three medals).

To be sure there are other nations with big LGBT issues that fared better. For example, Russia won 56 medals and finished fourth overall. Sex between two people of the same gender is legal in Russia, even if there are other issues in that country.

Still, the lesson should be clear: If you want your population to thrive, including in the world of athletics, let them be free.