Barcelona - Andres Iniesta waved goodbye to Barcelona on Sunday and his supposed successor scored the winner as Philippe Coutinho's superb strike sealed a 1-0 victory over Real Sociedad.
Iniesta, with a tear in his eye, walked off to a standing ovation from the Camp Nou when substituted in the second half, having unfastened his captain's armband and handed it to Lionel Messi.
If Messi is to become Barca's new leader, Coutinho is the player marked out to assume Iniesta's creative responsibilities and it was perhaps fitting the Brazilian proved the difference on a night almost entirely devoted to his 34-year-old team-mate.
After his number eight had come up on the fourth official's board, Iniesta first hugged Messi and then embraced the rest of his colleagues. He clapped the crowd, blew them a kiss, before exhaling and ducking into the dug-out.
After 22 years at the club and 16 in the first team, Iniesta's 674 appearances for Barcelona is bettered only by Xavi Hernandez, who was also on the pitch before kick-off to join in the tributes.
Real Sociedad welcomed Iniesta with a guard of honour while the crowd formed an impressive mosaic to spell out 'Infinit Iniesta' on the two sides of the Camp Nou, with an infinity symbol, doubling up as number eights, at the ends.
A giant flag behind one of the goals read 'Gracies Per Tant', 'thank you for so much'.
Iniesta exchanged pennants with Xabi Prieto, the 34-year-old midfielder who is also calling time after 15 years in the first team of Real Sociedad. Prieto came on in the 88th minute to great appreciation from the visiting support.
There was also a football match to win and Barcelona's victory means they finish top of La Liga on 93 points, 14 ahead of their nearest rivals Atletico Madrid and 17 clear of Real.
DEMBELE INJURY CONCERN
The one blot on the night was an injury to Ousmane Dembele, who had to go off in the 53rd minute after sustaining an injury to his right foot towards the end of the first half.
Dembele was seen being handed an ice pack on the bench, with France now facing an anxious wait for the diagnosis before the start of the World Cup.
Ernesto Valverde stayed true to his word that he would rest Messi, who only came on for the final 23 minutes.
Early on, Gerard Pique miscued when left free at a corner and Ivan Rakitic headed wide but otherwise Real Sociedad were fairly comfortable in the first half.
Nelson Semedo wanted a penalty after he was tripped by Alberto De La Bella and Luis Suarez wanted a harsher punishment when Raul Navas lunged in on Dembele.
Navas, nowhere near the ball, caught Dembele's right foot and Suarez was booked for his complaints to referee Jose Munuera.
Dembele finished the half but was taken off shortly after the interval as Denis Suarez came on to replace the French forward.
Coutinho's goal came rather out of the blue but was no less impressive for the fact as he wiggled his way into space on the left of the penalty area and curled a trademark shot inside the far corner.
That was his last significant contribution before being replaced by Messi, who almost set up a second only for Denis Suarez to squander the finish.
Finally, Iniesta was replaced in the 82nd minute by Paco Alcacer and the fans did not stop chanting the veteran's name until the final whistle blew.