RIO DE JANEIRO (AP) — Just three seconds. That's all India needed on Monday to draw with Germany and punch in its best result in Olympic men's field hockey in 20 years.

But in those three seconds, Germany captain Martin Haner lashed in a hit-and-hope shot from long range which deflected off Christopher Ruhr, hit the post high, and went in.

Ruhr was chased along the sideline by his overjoyed teammates in certain anticipation of a 2-1 win. Moments later, it was official.

The Indians stood around in disbelief at a cruel finish to a pool match in which they held their own against the defending Olympic champions.

Had they drawn, it would have been their best result since a 1-1 draw against the same opposition in the same round in the 1996 Atlanta Games. Germany was the defending champ back then, too.

The Indians got limited sympathy from their coach Roelant Oltmans.

"Those three seconds are still part of the game," Oltmans said. "Not just the three seconds, but the last couple of minutes, we didn't stick to the structures we normally do. All of a sudden, people are changing the plan according to their own ideas. That's what went wrong. They played very well for about 58 minutes, and in the last minutes you have to keep playing the same way and do things right. They didn't, and that's disappointing.

"We showed performance-wise there's nothing wrong, but in the details we still need to improve."

It's the little things Oltmans is trying to pass on to his team since he became the coach a year ago, hoping they find root to continue the team's upward trajectory since it won the 2014 Asian Games to qualify for Rio.

Also India's high performance director, he's found a receptive audience in a hockey scene burdened and emboldened by one of the greatest periods of sporting dominance in history.

India used to own Olympic field hockey. It won six straight Olympics from 1928 to 1956, and medaled in the next four to 1972.

But despite being the most powerful voice in world field hockey, India didn't oppose the change of Olympic surface from grass to artificial turf starting with the 1976 Montreal Games and, there, India came seventh, failing to medal for the first time. The surface change impacted severely. As late as 1996, India could afford only 12 artificial pitches in the country.

Its record eighth and last gold medal in the depleted 1980 Moscow Games failed to mask strife and rapid decline in the game at home, where administrators lusting for power were fighting with each other and the Indian Olympic body.

Planning and funding was crippled, and talent identification and nurturing withered. India hasn't won an Olympic medal since Moscow. It hasn't won the World Cup since the first in 1975, and won its first Champions Trophy medal since 1982 this year in London.

That result is part of a path being slowly filled with medals, including silvers at the 2014 Commonwealth Games and this year's Sultan Azlan Shah Cup.

All of the present 16-man team was born after the Moscow Games, so have never enjoyed Olympic glory. Oltmans, who led his native Dutch teams to men's and women's world championships and the 1996 Olympic men's gold, has had to pass on his own experiences to bolster the confidence of his side, especially the seven players who were in the 2012 London Games squad which didn't win a game and finished 12th from 12 teams.

That wasn't as embarrassing as failing to qualify for the 2008 Beijing Games.

Still, India is at these Olympics as a medal contender for the first time since Moscow, and showed its mettle, after a shaky opening 3-2 win over Ireland, against the Germans.

After Niklas Wellen's deflection in for Germany in the second period, India replied within five minutes through a penalty corner by specialist Rupinder Pal Singh, his third goal of the competition.

It stayed even, growing tenser, into the last quarter. Argentine fans waiting for the next match backed the Indians and booed the Germans, who were imposing themselves with sustained pressure. Their reward came with three seconds to go.

After sitting in his goal and taking time to compose himself, India captain and goalkeeper Parattu Sreejesh said the result was a harsh lesson on playing hard to the end but one they will take.

"That shows the difference between champions and losers," he said.

"I saw the (goal) ball, expecting a fast deflection, but it was slow, and I never thought it would take that particular angle because it hit the bar and went in. Sometimes deflections don't give you a chance, but we have three more (pool) matches, and we're going to go for it, be positive."