LUXEMBOURG (AP) — Diego Costa scored his first goal for Spain in seven appearances to help the defending European champion ease to a 4-0 win at Luxembourg and rebound from its first qualifying loss in eight years on Sunday.

The placid victory put Spain back on track to qualifying for the 2016 European championship three days after its 36-game unbeaten streak in qualifying ended in a 2-1 upset at Slovakia.

David Silva steered Spain to a 2-0 lead by opening the scoring in the 27th minute and setting up Paco Alcacer for his third goal in as many games in the 42nd.

Costa missed several chances before the Premier League's leading scorer ended his frustration with Spain in the 69th.

"I was really annoyed at not having scored before. Now it is a fresh start," Costa said. "I hope that from now on everything will go better for me. It was difficult for me to score, and in many games where I had not scored, the side lost. I have to thank the boss for all the opportunities he has given me to demonstrate what I can do."

Juan Bernat capped the win in the 88th from a pass from fellow debutante Rodrigo Moreno, providing Spain coach Vicente del Bosque with proof that he is rejuvenating the national team.

"We are all happy with Diego Costa's goal, and he will be a very useful player for us," Del Bosque said. "We have to continue picking up points and improving our way of playing little by little."

Elsewhere, Slovakia won 3-1 at Belarus thanks to a double by Marek Hamsik to remain the leader of Group C with nine points.

Spain is level with Ukraine on six points after Ukraine beat Macedonia 1-0 at home. Macedonia and Luxembourg have one point each.

After aligning 11 players against Slovakia who all took part in Spain's failed bid to defend its World Cup title, Spain coach Vicente Del Bosque made four changes to his lineup and gave debuts to Bernat and Moreno in the second half.

The most significant change was turning the goalkeeping duties over to David de Gea following Iker Casillas' error against Slovakia that has earned him further criticism after his poor showing in Brazil.

The other major move was to start Alcacer alongside Costa in place of Cesc Fabregas. While Alcacer has enjoyed a perfect start with Spain, Costa had come up empty in his six matches despite his nine goals for Chelsea and excellent 2013-14 season with Spanish champion Atletico Madrid.

As expected, Spain dominated possession from the start on the rain-slicked pitch at Josy Barthel Stadium.

But Costa needed a plethora of chances to finally get his goal.

Of seven early shots by the Brazilian-born striker, three were saved by goalie Jonathan Joubert while the rest were off-target.

So it fell to Silva to break through when the forward controlled a long ball for Costa that a defender had headed back. Silva used his left foot to deftly control the loose ball with one touch before unleashing a strike from outside the area that sailed past Joubert.

Costa insisted but his miss in the 31st saw him pull his shirt over his head in disbelief that his shot went well wide after he had all the space and time he could have asked for to size up Joubert.

Just when Luxembourg had forced De Gea in action for the first time, Alcacer made it 2-0 when he stroked in a short pass from Silva after Dani Carvajal made an incursion down the right side.

Costa got his goal when Luxembourg's defense fell apart, leaving several Spain players unmarked inside its area. Sergio Busquets' shot hit Costa in the chest, and he quickly turned and fired the ball home.

Alcacer later started the move that led to Valencia teammate Rodrigo finding Bernat to seal his ideal debut.

Slovakia's Hamsik scored in the 65th and 84th before Stanislav Sestak added another in stoppage time. Timofei Kalachev scored for Belarus in the 79th.

Ukraine won thanks to Serhiy Sydorchuk's goal in first-half injury time. Andriy Yarmolenko could have increased Ukraine's advantage in the 47th but missed a penalty.