Gerard Pique bowed out at Camp Nou on an emotional night as Barcelona beat Almeria 2-0 to move top of La Liga, despite missing several clear chances on Saturday.
This was the 35-year-old defender's last home game for the club, whom he has played for 616 times, and the World Cup winner will retire from football after Tuesday's visit to Osasuna.
Goals from Ousmane Dembele and Frenkie de Jong allowed Pique to go out in style in front of the home fans as Barcelona eased two points clear of Real Madrid, who visit Rayo Vallecano on Monday.
A giant banner was draped over the centre-circle bearing the message "Sempr3" -- a play on "always" in Catalan and Pique's shirt number -- as he led the team out wearing the captain's armband, instead of Sergio Busquets.
Whistles from recent weeks because of Pique's struggles turned to cheers every time he touched the ball, as fans paid their respect to a club legend and arguably their best ever central defender.
"Sometimes loving is letting go," Pique told supporters in a tearful speech after the game.
"I am sure in the future I will be back here again. It's not a goodbye.
"I left after 17 years to get some air. My grandfather made me a club member. I was born here and I will die here. Visca Barca."
Pique, who won 30 trophies with the cub over 14 years since re-joining from Manchester United, lined up in a makeshift defence featuring three left-backs.
Jordi Alba played in his natural position, while Alejandro Balde started at right back and Marcos Alonso at centre-back, as Barcelona wait for their injured defenders to return.
- Missed chances -
Barcelona had the chance to go ahead early on when they were awarded a soft penalty for a handball by Kaiky, but Lewandowski scuffed his effort wide, off the outside of the post.
Fans had called for Pique to take the penalty, but the defender appeared to turn the opportunity down and left the league's top goalscorer, and player of the month for October, with the ball.
Almeria created an opportunity of their own when Largie Ramazani broke through and Marc-Andre ter Stegen rushed out to deny him, while Gonzalo Melero cleared a Ferran Torres effort off the line.
Then the Barcelona winger, when well placed to shoot himself, generously crossed for Dembele.
The French international inexplicably headed straight at Almeria goalkeeper Fernando Martinez with the rest of the goal gaping.
Dembele finally grabbed the opener early in the second half, dribbling in from the right wing and then slotting home superbly.
Minutes later he had another huge chance but after dribbling around goalkeeper Fernando, refused to pull the trigger, and the recovering defence managed to stifle Dembele before he got a shot away.
Ansu Fati, on as a substitute, should have scored himself but fired straight at Fernando from Alba's fine cross, but De Jong was on hand to turn home the rebound.
Pique received an ovation as he was replaced in the final stages, embracing each of his team-mates on the pitch and blowing kisses to supporters before departing.
The game continued, virtually unnoticed, as Camp Nou paid homage to Pique by chanting his name as he hugged Barca coach Xavi, the substitutes and the staff.
"It was a historic night and complete for everyone, especially for Gerard," Xavi told DAZN.
"We had a great game, we wanted to say goodbye to him in the best way possible.
"The bigger the game is for him, the bigger he plays. I have already said he is a Barca legend and we are very grateful to him."
Earlier an impressive Chimy Avila brace helped Osasuna win 2-1 at Celta Vigo and climb provisionally fifth, continuing their strong start to the season. It was a disappointing start to life at Balaidos for new Celta coach Carlos Carvalhal.