Memphis Depay scored a team-leading 11th LaLiga goal of the season to give Barca the lead on 25 minutes before Sergio Busquets struck a rare goal nine minutes into the second half to seemingly make the victory safe. But a Mallorca team fighting to avoid relegation ensured a nervy finish when Antonio Raillo found the net following a free-kick with just over 10 minutes remaining.
- La Liga on ESPN+: Stream LIVE games and replays (U.S. only)
- Don't have ESPN? Get instant access
Barcelona came into the game on the back of losing three consecutive home games in a single season for the first time in their history. The slump in form had allowed Real Madrid to clinch the league title on Saturday and kept in jeopardy Barca's hopes of qualifying for the Champions League next season.
Sunday's result takes Xavi Hernandez's side back up to second place in LaLiga, a point above Sevilla and four clear of Atletico Madrid. More importantly, Barcelona now have a nine-point cushion to fifth-placed Real Betis, who have a game in hand, as they seek to secure a top-four berth.
"I am satisfied with the win and the performance," Xavi told reporters afterward. "I think we played well, not excellently, but we dominated. It was a 3-0 game. We'd been on a bad run, especially at home, and it was important to win.
"The points are vital to be in the Champions League next season. There are five teams in the race [for three places] and it has to be us. Real Madrid have already won the title. Congratulations to them, they are worthy winners because 38 games do not lie. Now it's about winning that five team mini-league, qualifying for the Champions League and finishing second."
While perhaps not as convincing a victory as Xavi would have hoped, the game did see the return from injury for the first time since January of young starlet Ansu Fati. The 19-year-old made his reintroduction as a substitute for the final 15 minutes, earning what may well have been the loudest cheer of the day from the Camp Nou crowd.
"He is a special player, you see that in training, someone who knows where the goal is," Xavi said of the returning forward. "I see him more as a No.9 than a winger as he comes back from injury. He has to be close to the box. He's lacking rhythm and match fitness, but it is great news to have him back. It is a shame we have not had him for these last few months, I am sure he would have helped, but very happy for him."
Following a brilliant through pass by Jordi Alba, Depay fired Barcelona ahead midway through the first half with a close-range finish.
The Catalans extended their lead early in the second half when Busquets controlled a rebound in a crowded area and found the space to drill the ball into the back of the net.
Mallorca's goal came from nowhere and the final score made the match look closer than it was.
Information from ESPN's Sam Marsden and Reuters was used in this report.