Alves appeared to be on his way out of Barca having failed to agree a new deal by the end of the season and his tearful speech to fans following their Champions League win last weekend sounded like a farewell.
Due to become a free agent at the end of this month, Alves agreed a new two-year deal on Tuesday with an option of an extra year after some choice words from team mate Messi.
“Messi said to me, ‘Dani where are you going to be better off than here?’,” Alves told a news conference.
“For a long time we have said that we have a very good life here at this club and in a fantastic city with an ideal climate.
“Everything influences you when you make a decision. We had the same conversation a year ago when they were talking about (other clubs) signing Leo and me. We realised that nowhere would we be better off than here.”
Alves spoke angrily at a news conference last month when he said he felt that he was not appreciated by Barca.
He had been singled out for criticism during the first half of the season when the team failed to match the blistering start by Real Madrid but in the last few months he hit form as Barca won La Liga and the King’s Cup, as well as the Champions League.
Alves also said that the decision by Luis Enrique to stay at the club was important in making his mind up. The coach signed a one-year extension to his contract that ties him to Barca until the end of the 2016-17 season.
“He has returned the club to the position where it should always have been,” said Alves.
“He restored the motivation, the possibility of winning the treble.
“Luis Enrique has influenced my decision because I like people who work hard and have character. I would compare myself to him especially how he was as a player.”
(editing by Justin Palmer)