"Obviously this is a bitter way of losing a match, in the final seconds," said the Swede after the game.
The game was level until the 93rd minute when Spain striker David Villa struck the winner to score his fourth goal of the tournament.
"Spain had a lot of possession, however, and created some good opportunities as well so we have to congratulate them.
"I've said before they're the best passing side in the world so I want to pay homage to our team, despite this bitter loss," added Lagerback.
Sweden produced a fine display in the first half but they lost their balance after the substitution of talisman Zlatan Ibrahimovic, who cancelled out Fernando Torres’ opener.
"Zlatan had some pain in his knee and we had a brief discussion with our medical team."
"We thought taking him off was the better option rather than risk making the injury worse. Zlatan put in a top-class performance in the first half and of course we missed that."
Sweden are second with three points and they will have to beat Russia on Wednesday to secure a place in the quarter finals.
“In the midst of this desolation we realise it's still in our own hands. We're going to recharge our batteries over the next few days and then get ready for another fantastic game.”