Ireland will battle for a place at London 2012 in Sunday's final at the Olympic qualifier in Belgium after beating Spain on Thursday.
Two Audrey O'Flynn goals and an Alex Speers strike helped Gene Muller's team beat the 1992 Olympic champions.
The Irish led 3-1 but endured a tense finish after a second Spanish goal.
Ireland face Belgium in their final pool game on Friday and the competition hosts are likely to be the opposition in Sunday's decider.
Barbara Malda cancelled out O'Flynn's opening goal for the Irish but O'Flynn restored Ireland's lead in the 28th minute.
Alex Speers extended Ireland's lead with a 62nd-minute goal and held on to win despite Spain's second goal three minutes from time.
Spain have played at every Olympics since winning gold in 1992 but now look likely to miss out on the event for the first time since 1988.
Only the winning team on Sunday will qualify for the London Olympics.
Friday meeting between the Irish and Belgium now looks likely to be a dress rehearsal for Sunday's high-pressure final clash.
The Irish men endured heartbreak last weekend when they missed out on the Games by suffering a last-ditch defeat against Korea in the qualifier final in Dublin.
Ireland coach Muller paid tribute to his players after Thursday's win.
"It was a fantastic win for us in a very high pressure match. The players put in a great performance and we got what we deserved," said the Irish coach.
Friday's final pool game against the Belgians starts at 18:00 GMT with the final set for Sunday at 15:30 BST.