Washington: Two Indian-origin students have helped the US win the prestigious International Mathematical Olympiad after more than two decades.

Shyam Narayanan, 17, and Yang Liu Patil, 18, were part of the six-member US team that won the renowned award after a gap of 21 years. India was ranked 37th in the competition.

"Go Team USA! America took first place in the International Mathematical Olympiad for the first time since 1994," the White House tweeted, and attached a photo of a congratulatory letter from the US President Barack Obama. Yang Liu Patil's mother is from China and father from India.

In addition to Patil and Narayanan, three other US team members won gold medals: Ryan Alweiss, Allen Liu, and David Stoner.

A sixth member, Michael Kural, missed gold by one point, settling for silver. In the International Mathematical Olympiad (IMO) held in Chang Mai, Thailand, the US defeated China by just four points, 185-181. South Korea took third place.

China has won the Olympiad the maximum number of 19 times. "It's been 21 years," Team USA's head coach, Po-Shen Loh, told The Washington Post. "This is a huge deal. This is a matter of national pride," he said.

"One reason we are super excited is that for the past five years or so, we've been consistently second or third. It's actually quite difficult to win. We are going up against a natural population disadvantage in the sense that China, which is the usual winner, has four times as many people," Loh said.

IMO is the World Championship Mathematics Competition for High School students and is held annually in a different country.

The first IMO was held in 1959 in Romania, with 7 countries participating.

Nowadays, over 100 countries from five continents participate in the contest.