The win, a prerequisite to keeping Sweden on course for pipping Hungary to the second spot in Group E, long looked uncertain as a remodelled line up struggled to break down the determined part-timers of San Marino.
After the crushing 1-2 loss to Hungary on Friday, Sweden coach Erik Hamrén rang the changes. Left back Oscar Wendt, given much of the blame for the loss, was dropped and Sunderland's Sebastien Larsson and midfield stalwart Anders Svensson had to make do with a spot on the bench.
Sweden huffed and puffed in a first half that was characterised by a series of half chances for the blue and yellows. Johan Elmander and Olo Toivonen, deployed in 'the hole' behind Milan star Zlatan Ibrahimovic, were guilty of the worst misses of the half.
It wasn't until San Marino had Davide Simoncini sent off that the Swedes finally moved up the gears, with the match well into its final third.
The impressive Kim Källström broke the deadlock in the 64th minute, quickly followed by Christian Wilhelmsson six minutes later. With the home side's valiant defence broken the result never looked in doubt after that.
Deputy left back Martin Olsson scored the third and Tobias Hysén, son of the former Liverpool legend Glenn, claimed the fourth with a sweet left foot finish.
Wilhemsson, back in the Swedish line for this week's qualifiers after a long period in the international wilderness, completed the rout in stoppage time.
Sweden are now in second place in Group E thanks to a superior goal difference from their matches against Hungary, and with a game less played.
Sweden's Euro 2012 qualifying campaign comes to a close with matches away in Finland and at home to The Netherlands in the beginning of October.