China completed their sweep of the table tennis gold medals at the Rio Olympics when their men's team defeated Japan 3-1 in the final.

With the win, the Asian powerhouse has now won 28 out of 32 golds awarded since table tennis became an Olympic sport in 1988.

The experience and skills of the Chinese team, who included Olympic individual champion Ma Long, singles silver medallist Zhang Jike and world number three Xu Xin, ultimately proved too hard to crack for Japan.

But Japan, who celebrated their first ever medal in the men's team event, did not settle for silver without a fight.

After Koki Niwa dropped the opening singles match quickly to Ma, Jun Mizutani defeated Xu in a thrilling 3-2 battle of spins and smashes to tie the score at 1-1.

"I think it was the first time that China lost a match in the team event, if I remember correctly, from London and Beijing," Thomas Weikert, president of the International Table Tennis Federation, told Reuters.

"China was the best, but it was close."

Though Japan's Maharu Yoshimura and Niwa claimed the first game of their doubles match against Zhang and Xu, they were unable to capitalise as they lost 3-1. Chinese team captain Ma then wrapped up the win by crushing Yoshimura 11-1 11-4 11-4.

Reflecting the charged nature of the evening, China's team coach Liu Guoliang, who has calmly watched his players with arms folded for most of the Olympics, was on his feet shouting and cheering each point won.

"In the first game of the match, I didn't take enough initiative and [Mizutani] fought very fiercely," Xu said of his loss in the second singles encounter.

"I thought I had a chance to win in the fifth game when I was leading ... but I didn't make the best of the opportunity."

Mizutani told Reuters that out of 50 games he had previously played against Xu, he had not won a single one. "Therefore this match, I was determined to exact revenge," he said.

The men's team final concluded the Olympic's table tennis programme in Rio, where China also won gold for the men's and women's singles events and the women's team event.

Coach Liu, while holding the Chinese flag in celebration, said he had told his players that he was extremely pleased with their performance.

"Ma Long has gone unbeaten this Olympics, he has achieved perfection in his Rio journey. Jike has won a gold and silver," he said. "Their era has arrived."

Earlier on Wednesday, Germany beat South Korea to take bronze, with Timo Boll playing through an injury to win the deciding match.