Lionel Messi scored twice maintaining Barcelona’s top position in the La Liga title race, effectively relegating Osasuna.
Defending La Liga Champions Barcelona are level on points with Real Madrid, who beat Deportivo la Coruna 6-2 later on Wednesday and have a game in hand.
Messi’s 501st Barca goal opened the scoring, before Andre Gomes followed up with a goal of his own.
Osasuna’s Roberto Torres gave their side hope, but Barca’s offense was too much for them to handle, with additional srikes by Gomes and Messi, two from Paco Alcacer and Javier Mascherano’s first Barca goal followed.
Leganes beat Las Palmas later on Wednesday to confirm bottom side Osasuna’s relegation.
Argentina forward Messi has now scored 49 goals this season in all competitions, from 48 games.
Mascherano’s first goal in 319 games for Barca was thumped home from the penalty spot after Messi had been withdrawn.
As he ran up to take it, the Barca bench watched on in excitement, with Luis Suarez – rested for the match – barely able to contain his glee.
“At first I tried to get out of it but under pressure from my team-mates and the crowd I decided to take it on,” Mascherano said.
“It would have been a fun moment to remember in years to come had I missed it. I wasn’t sure about it at all but it was difficult to say no to my team-mates.”
It was the 32-year-old’s third goal in senior club football, having scored twice during three years at previous club Liverpool – who he left for Barca in 2010.
“The fans behind the goal were chanting for Mascherano to take it,” manager Luis Enrique said. “I am happy for him – he is a key player for the club and he has shown that down the years.”
Messi (12′ minutes, 61′ minutes)
André Gomes (30′ minutes, 57′ minutes)
Alcácer (64′ minutes, 86′ minutes)
Mascherano (67′ minutes pen)
Torres (48′ minutes)