The Scots needed an unlikely win against the world and European champions to guarantee them a play-off spot or at least match Czech Republic's result in Lithuania, but most of the hope went out of the window after a first-half double from David Silva.

David Villa netted a third in the 54th minute in the Rico Perez Stadium before Scotland substitute David Goodwillie, on for Charlie Adam, scored a consolation goal from the spot after Victor Valdes had fouled Craig Mackail-Smith.

And - with the Czechs winning in Lithuania - it was all over for Scotland, who have not made the finals of a major tournament since the 1998 World Cup in France.

There is no shame in losing twice to Spain - it was 3-2 for the visitors at Hampden - but in hindsight, Levein must look back at the two points dropped against Lithuania in the opening game and the defeat and draw against the Czechs.

However, the Scotland boss insists he was still trying to assemble his side in the early stages of the campaign.

"I am disappointed we didn't take any points tonight but the harsh reality is that Spain were better," he said.

"It doesn't get much harder than playing the European and world champions at their ground.

"But I feel we have improved and if we had three or four games before we started the campaign we could have got a better start.

"But I didn't know my best team then. "It has taken me over a year to feel we have a strong squad.

"The campaign started slowly as we tried to establish who were our best players, trying to pull it all together but the second part was better.

"We missed out this time but we are determined not to miss out the next time.

"For the World Cup we will start from a better position, with a solid base.

"We have a fair idea who our best players and we are looking to increase our pool of players.

"So I have a great deal of confidence and look forward to the World Cup qualifiers.

"We will use everything we have learned in the last eight games for them."

Spain finished with a clean sweep of wins in Group I but boss Vicente del Bosque insists there will be plenty of competition in the finals next summer.

He said: "There will be many good teams there, England, Germany and France - there are many of them."

The Spanish coach was as generous as he could be about the visitors.

"The first half tonight was organised but there were more opportunities in the second half. Scotland have improved from the first game at Hampden, they are more stable.

"I watched them in Liechtenstein and they were very good but I think the heat affected them."