Lionel Messi made amends for a missed first-half penalty by scoring both goals as Barcelona won 2-0 at Alavés on Saturday.

Messi, who hit the woodwork three times but failed to score in last week’s 2-0 win over Real Betis, endured further frustration when his spot-kick was parried away by Fernando Pacheco in the 41st minute after Gerard Piqué was fouled.

The five-times world player of the year went on to break the deadlock with a scrappy effort in the 55th minute that took a heavy deflection off the Alavés defender Alexis Ruano – his 350th La Liga goal for Barcelona –before showing his class with a ruthless shot into the bottom corner to kill off Alaves.

Barça, who suffered a shock home defeat by Alavés in the third week of last season, headed to the Basque country without Luis Suárez, although their morale was boosted by the signing of Ousmane Dembélé on Friday.

Andrés Iniesta returned from injury to offer more stability in midfield but it was a lapse a in concentration in defence, from Piqué, that gave Alaves a golden opportunity to take the lead. The striker Rubén Sobrino raced into the box ahead of the stranded Spain international but was thwarted by Marc-Andre ter Stegen in the Barça goal.

It was one of two scares in an otherwise comfortable win for Barça and Ernesto Valverde praised his side for a professional display in defiance of the gloomy atmosphere around the team following the departure of Neymar’s to Paris Saint-Germain.

“We came here at a time when people are saying a lot of things about Barça, and that can have a negative impact,” he said. “But the team showed that was not the case. “We’ve had some difficult moments and we’ve overcome them. Now we’ve got six points and we’re moving on upwards.“

Zinedine Zidane’s son, Enzo Fernández, made his league debut as a late substitute for Alavés but was unable to help his side get back into the game. Paulinho made his Barcelona debut when he came on in the 88th minute, while Messi was denied a hat-trick when his effort from outside the area bounced off the bar.

Elsewhere, Ángel Correa and Yannick Carrasco each scored inside the first five minutes to put Atlético Madrid on their way to a 5-1 drubbing of Las Palmas. Jonathan Calleri pulled one back with a second-half header but Koke added two impressive strikes after the break. Thomas Partey completed the rout after the home side’s striker Jonathan Viera had a penalty saved by Jan Oblak.