Bruna Takahashi helped Brazil win the women's team title ©Getty Images

Brazil won both team titles at the International Table Tennis Federation (ITTF) Pan American Championships, taking the country's haul of gold medals from the event in Lima to four.

The trio of Caroline Kumahara, Bruna Takahashi and Jessica Yamada were within a match of elimination in their semi-final against the United States, but clutch play from Kumahara saved the day.

Having lost of Lily Zhang in the opening match of the tie, Kumahara faced Amy Wang in a winner-takes-all fifth match, but triumphed 11-5, 11-4, 7-11, 11-7.

Brazil therefore won the semi-final 3-2.

Takahashi then played the hero's role in the final against Canada, defeating Mo Zhang in the fourth match of the tie to clinch a 3-1 win and the gold medal.

Chile shared the bronze medal with the US.

Vitor Ishiy was Brazil's star man with two wins in each of the semi-final and final ©Getty Images
Vitor Ishiy was Brazil's star man with two wins in each of the semi-final and final ©Getty Images

In the men's competition, being without individual champion Hugo Calderano did not hamper Brazil.

With Vitor Ishiy winning two matches in either tie, Chile were dispatched 3-1 in the semi-finals and Argentina beaten by the same scoreline in the final.

The US and Chile shared a bronze medal once again.

Team finals brought the ITTF Pan American Championships to an end.