A win in the placement match in Vienna could give a Swedish ticket to the World Championship finals in Germany and the Netherlands next year.
This if the Netherlands reaches the semifinals in the European Championship, which will be decided on Wednesday when they meet Denmark in a decisive match.
Sweden was forced to win to take third place in the group and pulled away to three-goal leads both in the first half and after the break.
But Montenegro kept coming back and made the end dramatic.
The Swedish women could however hold on to a 25-24 lead in the last minute despite a Montenegrin penalty (Milena Raicevic shot at the post) and a final opposing attack.
There have been setbacks during this championship that we've had to fight against, but it gives an extra boost that we get to change environment and play a match that we need to win, says Emma Lindqvist to Viaplay.
Nathalie Hagman became top scorer with six goals and Jamina Roberts and Clara Lerby scored five goals each.
Sweden got help when Poland surprisingly won over Romania with 29-24 and took their first win in the intermediate group stage.
This meant that Romania disappeared from the battle for third place, which was between Sweden and Montenegro.
Sweden was eliminated from the medal play on Sunday when the crucial match against France was lost.
The national team has four wins in seven matches so far in the European Championship.
The match for fifth place is played on Friday in Vienna.