Barcelona striker Lionel Messi put pen to paper on his new contract with the Catalan club on Monday.
Messi agreed to the new deal worth a reported 20 million euros ($27.4 million) net a year last week.
However, the four-time World Player of the Year has said he will only stay at Barcelona long as the club’s fans felt “affection” for him.
Messi was booed by certain sections of the Camp Nou crowd as Barcelona narrowly missed out on winning La Liga on Saturday in a 1-1 home draw to Atletico Madrid, who took the title for the first time in 18 years in a dramatic title decider.
“It is the people of (Football Club) Barcelona who will decide my future but my decision is to continue since I still sense that they feel affection for me,” the Argentine star wrote on the Chinese online messaging platform Weibo.
“But if that were not the case I would look for a solution, because I will always want the best for this club.”
Barca ended the season without a major trophy for the first time in six years forcing coach Gerardo Martino to quit after just one season in charge.
Messi said it had been a “hard year, personally and as a group”, and apologised to fans, promising to do better next season.
“We had an opportunity to achieve an aim in the last match and we did not manage to seize it,” he wrote in his message.
“I just want to say sorry to all the Barcelona fans and promise them that this coming year we will do justice to the club and achieve big things.” AFP