Spain lead Group I with 15 points from five games, followed by Czech Republic on nine after their 2-0 win over Liechtenstein on Tuesday. Scotland and Lithuania are on four points, with Liechtenstein bottom after four defeats from four.
Xavi got Spain off to a great start, scoring in the 19th minute when his shot from outside the area deflected over goalkeeper Zydrunas Karcemarskas at Dariaus ir Gireno Stadium.
Despite having little of the play, Lithuania equalized in the 57th minute when Marius Stankevicius scored a spectacular long-range volley past Iker Casillas and for a while the hosts looked as if they could unsettle the world and European champions.
But then Xavi took over. First he set Juanma Mata free down the wing and his cross was steered into his own goal by Lithuania defender Tomas Razanauskas under pressure from Fernando Llorente.
Then seven minutes from time Spain produced their best move of the match to make sure of the win, a slick passing move in the area ending with David Silva playing Mata in to score inside the near post.
So two and two victories for Spain, who are all but assured a place in the Euro 2012 finals.