The best four runners-up in the seven Uefa groups will play-off for a place in Canada. Scotland, having taken 18 points from seven games, could clinch one of these spots by beating Northern Ireland in Belfast on Thursday night.
That would leave Anna Signeul's side with a home game against the Faroe Islands on September 13 and then the final group game against Sweden in Gothenburg four days later. If results for both sides go according to plan, Scotland would need to win that match to have any chance of qualifying automatically.
The good news for the Scots, as Sweden coach Pia Sundhage acknowledged on Saturday, is that the gap between the sides has closed enormously since the teams last met in a friendly two years ago. Then Sweden won 4-1 and, although the scoreline on Saturday looks similar, Scotland paid dearly at Fir Park for conceding two goals from corners and a third at the start of the second half, when goalkeeper Gemma Fay spilled a cross.
Two years ago Sweden won at a canter, easing down in the second half but Scotland created more chances than their opponents at Fir Park, albeit Kim Little's penalty, which made the score 1-1, was all they had to show for their efforts. "Scotland have made remarkable progress in the last two years," said Sundhage.
Nevertheless, Sweden deserved their win. It was achieved through a lovely first goal straight from the training ground, which was scored by new Paris Saint-Germain signing Caroline Seger. A brace - much more dismally from Scotland's perspective - followed from another PSG player, Kosovare Asllani.
Sweden's captain Lotta Schelin, who plays her club football with French side Lyon, failed to add to her 65 international goals and that was due largely to a splendid performance from Scotland defender Ifeoma Dieke. The 33-year-old has shown huge resolve to recover from a serious knee injury sustained at the London Olympics and is now closing in on her long-awaited 100th cap.
Dieke played alongside Jenny Beattie with another central defender, Rachel Corsie, pushed up ahead of them in a 4-1-4-1 formation. Dieke won her battle with Schelin but the Vittsjo player was left frustrated after conceding from corners.
"We are usually very good at defending set-pieces, so these two goals were uncharacteristic," she said. "Everybody is kicking themselves, and losing their third goal was unfortunate as well.
"Other than that there wasn't much between the two sides and I thought we had the better chances. We just gave ourselves too much to do after losing these goals."
The Scots gave their opponents so much trouble on the left, through Hayley Lauder, Little and Lisa Evans, that Sundhage was forced into a tactical change at half-time.
Little's goal, which came after 19 minutes, continued a remarkable scoring run in the last three months. She arrived in Scotland having notched 11 goals in as many matches for Seattle Reign and when she converted her penalty it became her seventh goal from the spot in the 12-goal sequence.
"I would have given her a bit of stick if she'd missed that one after scoring six penalties for Seattle," Dieke added. "We're disappointed we lost to Sweden, but if we win in Belfast it virtually assures us of a place in the play-offs at the very least."
Northern Ireland, the side at the bottom of Group 4, lost 1-0 in Bosnia and Herzegovina on Saturday.