Zhang Yufei wrapped herself in a Chinese flag and beamed with joy after setting an Olympic record to win gold in the 200m butterfly at the Tokyo Games on Thursday.

The 23-year-old, who finished runner-up to Canada's Margaret MacNeil in the 100m, touched the wall in 2:03.86, well ahead of U.S. pair Regan Smith and Hali Flickinger, to win China's first swimming gold of the Games.

Waving her arms and cheering after the win, a teary-eyed Zhang soaked up the moment, beaming at her team mates in the stands after exiting the pool as they chanted her name.

Xuzhou-born Zhang, dubbed China's "Butterfly Queen", is part of the country's new generation of rising stars emerging from the shadow of Olympic and world champion Sun Yang, who has been banned from competing for four years due to doping violations.

Zhang, who finished sixth in the Rio final, could not stop smiling as she received her medal on the podium then rushed to pick up a large Chinese flag that had been thrown down onto the pool deck.

Wrapping it around herself, she also encircled her American rivals Smith and Flickinger in the flag as they stood and posed for pictures. Chinese netizens flocked to social messaging platforms to praise her, while local media lauded her achievements.

"Today Zhang Yufei steadily took the lead all the way and won the gold despite the impressive strength of her American competitors," said China's state backed Xinhua News agency.