(CNN) -- It is a timely boost for Barcelona heading into their Spanish title showdown with Atletico Madrid.
Lionel Messi, one of the world's best soccer players, is on the verge of a penning a new deal at the club.
The Argentina striker has had a lean season by his own impossibly high standards, but has still scored 28 La Liga goals in his 30 games.
Barcelona head into Saturday's epic title decider against Atletico knowing a win will secure their second successive La Liga crown.
And news that the club's record goalscorer is set to extend his stay at the Camp Nou is a huge fillip for the Catalans after weeks of negotiations.
A statement on the club's official website read: "FC Barcelona has reached an agreement to adjust the terms in the contract binding Leo Messi to the club as a professional first team player.
"The revised and updated contract will be signed over the next few days."
Messi joined the Catalans in 2000 at the age of 13 and has gone on to win 21 trophies with Barca, including six La Liga titles and three European Champions League crowns.
The 26-year was also voted World Player of the Year in four successive seasons, between 2009 and 2012, and will be one of the biggest names at the World Cup in Brazil.
News of his new contract comes just 24 hours before the biggest match of the season in Spain, as the two title contenders go head-to-head.
Atletico, who will also contest the Champions League final next weekend against city rivals Real Madrid, top the table and lead Barcelona by three points.
A Barca victory will hand Gerardo Martino's men the title courtesy of a better head-to-head record against their opponents. Atletico need only to avoid defeat.
Just a few weeks ago, after a disappointing home draw with Getafe, Martino said Barca's title race was run, but an unexpected dip in form by Atletico has presented them with a second chance.
And midfielder Xavi, who is chasing an eighth title in Barca colors, insists they must seize this opportunity. "We really believed we had no chance, but maybe we gave up too soon," he told the club's website.
"We thought we'd lost the league and these things happen in football, and now it's in our hands. It's a very important title, and we have to be together. It's an historic opportunity. It will be a great final match.
"(Atletico) are the best in defense, they pressurize you, support each other, and have different options up front. We are still hungry and people should be encouraged. La Liga should be seen as it is, competing until the end.
"Up against us are a great team. We are still hungry and people should be encouraged. This is a great generation, and this is an historic opportunity for us.
"It's a unique game and I don't know if it will happen again. It would be the icing on the cake for this generation, playing such an important match."