Aussie teen Chalmers stars as Ledecky motors on

Australia's Kyle Chalmers poses with his gold medal on the podium of the Men's 100m Freestyle Final during the swimming event at the Rio 2016 Olympic Games at the Olympic Aquatics Stadium in Rio de Janeiro on August 10, 2016. (AFP)

Australia teenager Kyle Chalmers scored a finger-tip victory in Olympic swimming's glamour race on Wednesday as US prodigy Katie Ledecky bagged her third gold of the Games.

Chalmers, still only 18, became the first Australian in 48 years to win the 100m freestyle, touching first in a blanket finish.

The teenager hit the wall in 47.58sec, just 22 hundredths ahead of Belgium's Pieter Timmers and American Nathan Adrian, the 2012 Olympic champion, who took bronze.

Chalmers is the first Australian to win the 100m free - widely seen as the blue riband event of men's swimming - since Mike Wenden's gold in Mexico City in 1968.

Chalmers said he had not been aware of the length of Australia's decades-long wait for another 100m title.

"I actually had no idea about that to be honest with you," he said. "I'm someone that probably doesn't follow swimming too much.

"I kind of stay away and follow basketball and soccer and football. I know that we've been beaten a few times."

The young Australian's victory came as American Ledecky sealed her third gold medal of the Games, anchoring the United States team home in the 4x200m relay.

Ledecky has already won the 200m and 400m freestyle gold medals at these Games.

Elsewhere in the pool, Michael Phelps returned from his heroics on Tuesday, when he won his record 20th and 21st gold medals, to safely reach the final of the 200m individual medley on Thursday.

Kazakhstan double

There was also a rare gold medal for Kazakhstan in the 200m breaststroke, where Dmitriy Balandin won his country's first Olympic swimming title since the break-up of the Soviet Union.

It was one of two golds for Kazakhstan on the fifth full day of Olympic action. Kazakh weightlifter Nijat Rahimov won the other in the men's 77kg category.

Beyond the pool, Japanese star Kohei Uchimura underscored his gymnastics dominance as he clinched a second straight all-around gold medal.

Uchimura snatched victory by just 0.099 points with a daredevil routine on the horizontal bar.

"Going onto the horizontal bar I knew what I had to do," Kohei said.

"I remained calm and controlled. This calmness I think was the key to my success."

The men's rugby sevens saw a day of upsets, with New Zealand losing to Japan in the group stage before being eliminated in the quarter-finals by Fiji, the South Pacific islanders chasing their country's first ever Olympic medal.

Japan scored a shock win over France to reach the last four.

In fencing, Tunisia's Ines Boubakri became the first woman from Africa to win a medal in the sport with a bronze in the individual foil, dedicating her achievement to "the Arab woman...who has her place in society."

In the football tournament, hosts Brazil finally sparked into life with a 4-0 win over Denmark in their must win game.

Gabriel Barbosa struck twice to reignite Brazil's quest for a first ever Olympic gold medal. Brazil now play Colombia in the quarter-finals on Saturday.

Veteran cyclists Fabian Cancellara and Kristin Armstrong hammered home their Olympic superiority with wins in the time trial.

It was Armstrong's third consecutive win in the race, a day before her 43rd birthday.

"I don't have words to describe it. When you've already been two times at the pinnacle of the sport, why risk coming back for the gold medal? The best answer I can give is that I can," said Armstrong, who retired after each of her two previous Olympic wins.

The star-studded USA men's basketball had to dig deep against Australia before pulling away for a 98-88 win.

Carmelo Anthony scored 31 points and Kyrie Irving added 19, including 12 in the final period as the Americans subdued their rivals.

In tennis, rain washed out all 25 matches, complicating Rafael Nadal's bid for three gold medals as he works his way back from wrist injury.