Montenegro, only officially recognised as an Olympic nation in 2007 and now also with a chance to win their first gold medal, edged ahead in the second-half and will contest the final on Saturday.
The Montenegrin men's water-polo team are in action in the semi-finals on Friday and coach Dragan Adzic, shaking his head in disbelief at his players' feat, said they would "absolutely" go and support their compatriots.
"It's amazing this success for a country of 600,000 people. It's historic, something we'll never forget," he said through an interpreter after his players had been showering each other with water in celebration.
"There are only 100 female players in our country," he joked.
If he is right they are some players, tournament top scorer Katarina Bulatovic the pick of the lot on a warm summer's evening, the tall Montenegrin firing in nine goals with awesome power.
The last encounter between the sides in a 2011 world championships quarter-final was shaded by Spain and this time the winner was anyone's guess midway through the second half, neither team having established more than a two-goal lead.
However two Bulatovic goals and three others in between an eight-minute goalless spell for Spain ultimately turned the game.
Bulatovic glossed over her crucial role in the team's win, saying their defence would be more crucial against Norway.
"I don't care about my goals. For me it's important the whole team plays well and that's it," she said, also struggling for words after the accomplishment.
Spain, seeking a first women's handball medal, will play South Korea for the bronze.
Marshalled by world player of the year Heidi Loke in attack and Katrine Haraldsen in goal Norway moved serenely into a second successive final with a 31-25 win over South Korea.
Questioned about their teamwork and commitment during a lacklustre group campaign, Norway responded in the most determined fashion as they dominated their Asian opponents in all facets of the game.
Korea's Sim Haein scored the game's first goal but there was barely a whimper from the crowd, who erupted seconds later when Marit Frafjord hit back then added another from which point on it was one-way traffic.
World and European champions Norway buzzed around the court and Loke top-scored with eight goals to condemn twice Olympic champions South Korea, who they also beat four years ago in the semi-finals, to another bronze-medal scrap.
"Earlier in the championship we were not running so much, but we're in really good shape and we are now running all the time. This is the way Norway plays so we have to do that," said Loke.
The teams met in the group stages and the pulsating encounter ended 27-27, but with Norway entering the semi-final having scraped past Brazil and South Korea's confidence high after dispatching Russia, the Asians were fancied.
Norway coach Thorir Hergeirsson said the quarter-final scare against Brazil, when they came back from six goals down in the second half to win 21-19, had woken his team up.
"I think in the second half against Brazil we came back to ourselves. We were doubting our qualities but we worked hard to get our identity back. When the girls get back to themselves there are few teams that are better," the Icelander said.
Korea coach Kang Jae-won just wished the competition had stayed in the Copper Box instead of switching to the Basketball Arena on Wednesday.
"The players' lack of experience showed today. They were overwhelmed by the enormous crowd and atmosphere," he told reporters through an interpreter.
Hergeirsson had sympathy for his crestfallen counterpart.
"Many of our players have been playing the Champions League so they know this kind of game. Korea are younger and less experienced. This was a big benefit for Norway," he told Reuters.
Crowd support or not, Norway ran their socks off and Goril Snorroeggen walked with an ice pack under her foot in the news conference room.
All the same, Haraldsen's shot-stop rate of 52 per cent, compared to her opposing number Ju Hui's 37, played a big part in keeping Norway ahead but like most handball players she would not take any plaudits.
"We stay together," she said. "That's what's good about this team."
Spain, whose women's side are seeking a first medal, will play South Korea for the bronze.
- Related links