Madrid:Spain qualified for next year's European Championship by beating Sweden 3-0 on goals from Joan Capdevila, Andres Iniesta and Sergio Ramos on Saturday.
The Group F loss at Santiago Bernabeu Stadium dropped Sweden into second place and left it requiring at least a draw from its final game against Latvia on Wednesday to advance.
Spain leads the group with 25 points, while Sweden stays with 23. Northern Ireland, which visits Spain on Wednesday, follows with 20 points.
"I'm very happy to be in the finals. I want to dedicate this win to our fans," Iniesta said. "We have sometimes suffered in the group but we always felt we would turn the situation round."
Spain, which gained revenge for its 2-0 defeat in Sweden a year ago, overwhelmed Sweden with its swift passing and fluid movements.
Sweden coach Lars Lagerback said Spain "was so much better" before expressing surprise at conceding two goals from corners.
"If I remember correctly, we have just conceded one goal after corner kicks in 10 years in competitive matches," Lagerback said.
Sweden captain Fredrik Ljungberg was dismayed by his side's heavy defeat.
"It's not fun to lose 3-0. We had our chances in the first half, but we did not capitalize," Ljungberg said.
Capdevila's first international goal arrived in the 14th minute when he turned the ball home after receiving Cesc Fabregas' back header from Xavi Hernandez's corner.
Spain forward David Villa then hit the left post in the 31st.
Iniesta enjoyed better success when he sidefooted past Sweden goalkeeper Andreas Isakson in the 39th to culminate a flowing move down the left between Xavi and Capdevila.
Sweden, lacking injured striker Johan Elmander and midfielders Niclas Alexandersson and Tobias Linderoth, fell further behind in the 65th.
Capdevila's attempted volley from Xavi's corner was cleared off the goal line, but Ramos sent a low shot home.
Sweden barely managed an effort on goal after halftime, with striker Zlatan Ibrahimovic continuing his two-year spell without scoring for the national team.
Spain: Iker Casillas, Sergio Ramos, Carlos Marchena, Carles Puyol, Joan Capdevila, David Albelda, Xavi Hernandez, Cesc Fabregas, David Silva (Albert Riera, 66), Andres Iniesta (Joaquin Sanchez, 52), David Villa (Raul Tamudo, 52).
Sweden: Andreas Isaksson, Mikael Nilsson, Olof Mellberg, Petter Hansson, Erik Edman, Anders Svensson, Daniel Andersson (Kim Kallstrom, 46), Fredrik Ljungberg, Christian Wilhelmsson (Kennedy Bakircioglu, 79), Markus Rosenberg (Marcus Allback, 60), Zlatan Ibrahimovic.