Groundbreaking games for women in Rio
From the dizzying gymnastics heights of African-American Simone Biles to Indian wrestler Sakshi Malik and Brazilian golden girl Rafaela Silva in judo, Rio proved a groundbreaking-games for women.
Usain Bolt and Michael Phelps had already arrived in Rio as global superstars of men's track and field and swimming.
But newcomer Biles's amazing acrobatic skills also won star billing with her record-equalling four women's gold and a bronze at her first Games.
The 19-year-old became the second African-American after Gabby Douglas in 2012 to win the all-around title, ending her Olympics in the spotlight by carrying the United States flag at the closing ceremony.
"I'm not the next Usain Bolt or Michael Phelps," the Texan had said. "I'm the first Simone Biles."
Despite the shining success of Biles, a gender gap remains with 169 events for men staged in Rio compared to 137 for women.
Nevertheless, the Games still had many firsts with judoka Majlinda Kelmendi winning Kosovo a gold at its maiden Games, as Monica Puig gave Puerto Rico tennis gold.
"I just proved that even after we survived a war, if they (kids in Kosovo) want something they can have it," said Kelmendi.
Silva, 24, who grew up in Rio's violent, poverty stricken 'City of God' slum, won special mention from IOC president Thomas Bach as the Games drew to a close.
"Rising from the favela to become Olympic champion, when you look at her childhood and what she had to overcome, she's an inspiration across the world," Bach said.
Malik also told how she had to overcome prejudice to become India's first medallist with freestyle wrestling bronze.
The 23-year-old from Rohtak, 76km northwest of New Dehli, said her parents had been criticised by local people when she started wrestling.
"I want to say that girls can also do a lot if you give them confidence," said Malik, who carried the Indian flag at the closing ceremony.
Women from the Middle East were more represented than ever before in Rio.
Weightlifter Sara Ahmed, wearing a sports hijab, blazed a trail by becoming the first woman from Egypt to stand on the podium, lifting 255kg to finish third.
Ines Boubakri won the Arab world's first ever women's Olympic fencing medal, dedicating her bronze to "the Tunisian women, the Arab woman... who has her place in society".
US fencer Ibtihaj Muhammad succeeded in her ambition to show the world that Muslim-American women could compete in elite sports.
The 30-year-old from New Jersey, the first US Olympian to wear a hijab -- a headscarf worn by Muslim women -- during competition, came away with a bronze in the women's team sabre event.
Saudi Arabia's Kariman Abuljadayel -- one of four women athletes sent by the conservative Gulf kingdom to Rio -- competed in the 100m sprint.
Emirati swimmer Nada Al Badwawi, who carried her country's flag in the opening ceremony, said: "We are slowly starting to change the mentality.
"My main goal is to break down these gender barriers and pave the way for other female swimmers."
Forty five percent of the 11,444 athletes -- 5,175 -- in Rio were women, slightly higher than in London 2012.
"Every National Olympic Committee has now sent female athletes to the Games," an IOC spokesman said.
New sports such as weightlifting were added to the women's programme in 2000, wrestling in 2004, and boxing in 2012.
The target in Tokyo in 2020 will be to make even more events open.
Yuriko Koike, governor of the Japanese host city, said, however, it was also hard to change mentalities in Japan.
"Women are doing fantastic performances in the world of sports, in the world of politics, unfortunately the percentage of women parliamentarians is lower in Japan than in other major places," the 64-year-old said.
"Hillary Clinton talked of a glass ceiling, I think we have got an iron ceiling.
"Along with Olympic athletes, Japan's female politicians will also take up the challenge and strive to become good role models."
The flame is out Rio 2016 #OlympicGames ends with confetti and a firework show! It has been magnificient! #Rio2016 pic.twitter.com/hs2vrqhN9e
Rio 2016 (@Rio2016_en) August 22, 2016