(Corrects paragraph 7 to say New Zealand's and Argentina's men's teams both have four points, not one)
TOKYO (Reuters) -Spain reached the quarter-finals of the men's Olympic hockey tournament on Friday after scoring a last-minute equaliser against group winners Australia, which gave them the draw they needed to advance.
India's women's team also celebrated a late-game goal which gave them a 1-0 victory over Ireland, keeping the South Asian nation's Olympic dreams alive.
South Africa's men's team failed to make it through their group after a 4-4 draw against Canada, which had already been eliminated. The draw meant Germany's men will advance to the knockout stages.
Spanish veteran Alvaro Iglesias Marcos said it was unbelievable the team scored their late penalty corner to finish the match against the in-form Kookaburras 1-1.
"We knew it would be the toughest game of the group and we played a perfect defensive match," said Iglesias Marcos.
"At the end we had our chance and we made it, so it was perfect."
The draw meant that Spain occupied third place with five points in Pool A, trailed by New Zealand and Argentina, who both have four points each.
New Zealand and Argentina will decide in their game later on Friday which team will get the pool's remaining ticket to the knockout stage.
Argentina will have to beat New Zealand to make it through. For the Kiwi's, a draw will be enough.
Host Japan, who are sixth in the group with one point, were sent packing as they will be unable to get enough points to get the fourth spot in the pool.
In the women's competition, Navneet Kaur delivered India their first triumph out of four matches against Ireland after pushing in a shot behind the Irish goalkeeper from within the striking circle.
"After we missed so many opportunities, we scored at the end. It's awesome," Kaur said.
"Now we are more confident for the next match."
India and Ireland, who are making their Olympic debut in women's hockey, both now have three points in their group.
While India and Ireland are equal in points, the Irish are still holding the fourth position in the group - which is good for a ticket to the knockout rounds - thanks to a better goal difference.
Both teams have one match left to play and both can still qualify depending on the results of the final round in the group.
In another match in the women's tournament, Germany beat South Africa 4-1.
(Reporting by Daniel Leussink; Editing by Muralikumar Anantharaman)