The Scots bounced back from a 38-13 defeat by Italy in their opening group match and now face a massive clash with Ireland on Saturday as they try to progress past the round robin and to the tournament in New Zealand next year.
This victory gave them a bonus point and a win over Ireland should guarantee them a top-two finish in the four-team group. The winners of the pool qualify automatically, while the runners-up will go into a repechage final qualifying tournament.
Scotland got off to the worst possible start at the Stadio Sergio Lanfranchi inside the first two minutes as Spain took the lead, Paula Requena Zamora breaking through the Scotland rearguard and Patricia Garcia Rodriguez sending the conversion over the posts.
However, Scotland managed to compose themselves in the Parma sunshine and responded on 19 minutes with a try of their own when Rhona Lloyd crossed in the corner. The try was checked by the TMO for a possible forward pass, but the score was validated.
And from Spain’s restart, they raced up the pitch to bag a second try when Meghan Gaffney ran fully 40 yards to touch down in the corner. This time Nelson converted and Scotland led 12-7 after 20 minutes.
The match was very open and that benefited Spain, who reclaimed the lead via a converted try from Margarita Rodriguez, before on the half-hour mark, Maria Garcia Gala did the same, although Garcia Rodriguez missed the conversion.
Scotland made sure, however, they were only two points behind at the interval when Nelson crossed the line, and while the conversion was missed, Spain went down to 14 women with a yellow card for Paula Requena Zamora.
The two teams traded penalties in the opening stages of the second half. It was even until Spain’s Monica Castelo Mejuto was cautioned for a high tackle, giving Scotland a chance to capitalise on a personnel advantage, which they took when Rachel McLachlan scored from a driving maul. Nelson converted to make the score 27-22.
Spain tried to respond, but Scotland held firm to set up a showdown with Ireland next weekend.