Faced with one of the most formidable teams left in the tournament, Sweden dug deep in their bag of dead-ball tricks and, though they did not execute them as cleanly as in previous games, it was still enough to see them through.
A scramble after a free kick saw Amanda Ilestedt score her fourth goal of the tournament - all coming from set pieces - and a Jonna Andersson corner was handled in the box, allowing Filippa Angeldahl to rifle home the resulting penalty.
"What's going on? It's completely crazy, completely crazy," Ilestedt told Swedish radio when asked about her red-hot scoring streak. "I'm happy as long as we're winning, but it's fun that the ball is going in too."
Sweden's dead-ball set-ups are often decided by assistant coach Magnus Wikman, who spends hours poring over ideas and then patiently drilling them with his players.
That collective effort has been their greatest source of success at the tournament - eight of their 11 goals coming from set pieces, either directly or after opponents failed to clear.
The Swedes successfully smothered Japan's fast-paced passing game in midfield. The Japanese side's best chances also came from set pieces but they missed a penalty and saw a free kick strike the bar and bounce on the line before spinning away.
Japan pulled a goal back in the 87th minute but it was too little, too late as Peter Gerhardsson's Sweden side played the percentages perfectly once again to set up a semi-final against Spain next Tuesday.
In doing so, the Swedes knocked out the 2011 champions and with the United States, Germany and Norway having already gone home, they ensured that whoever wins this enthralling World Cup will do so for the first time in their history.
Sweden's best result at the finals came in 2003, when they lost to Germany in the final, but this time they are aiming to go one better.
"Obviously we're not happy with a semi-final, we want to go the whole way," team captain Kosovare Asllani said. "I believe strongly in my team and we'll be more than ready for Tuesday."