Egypt forward Mohamed Salah has signed a new two-year contract with Liverpool.
His previous deal was scheduled to run out in the summer and there had been doubts he would stay with the Reds following comments from the 32-year-old during the season as well as speculation linking him with a move to Saudi Arabia.
However, he will now have the chance to add to his 243 goals and 109 assists for Liverpool in 393 appearances.
"Of course I'm very excited - we have a great team now," said Salah.
"Before we also had a great team. But I signed because I think we have a chance to win other trophies and enjoy my football.
"I have played eight years here, hopefully it's going to be 10. I'm enjoying my life here, enjoying my football. I have had the best years of my career here."
Salah has scored 32 goals in all competitions this season, including 27 in the Premier League as the Reds chase a 20th top-flight title. Liverpool are 11 points clear of second-placed Arsenal with seven games remaining.
Salah, who joined Liverpool from Roma in 2017, has won the Champions League, Premier League, FA Cup, League Cup and Fifa Club World Cup with the Reds.
He was one of three key Liverpool players who will be out of contract this summer, along with right-back Trent Alexander-Arnold and centre-back Virgil van Dijk.
Netherlands defender Van Dijk has said there has been progress on talks over a new deal but Alexander-Arnold has been heavily linked with a move to Real Madrid.
Salah's previous deal was understood to be worth more than £350,000-a-week and made him the highest-paid player in the club's history.
It is believed the negotiations over his new contract did not involve a pay cut as part of the talks.
Amid uncertainty about his future, Salah has already had his second-best season in terms of league goals at Liverpool in 2024-25. With seven games left, he could feasibly reach the 32 he scored in his first campaign.
In September, he said in a Sky Sports interview it was his "last season" at Anfield because nobody at the club had talked to him about a new contract.
Those comments were made after he had scored in a 3-0 win at Manchester United - a match he had treated like it was his last at Old Trafford.
Two months later, following a win at Southampton, Salah stated he was "disappointed" at not having been offered a new deal by Liverpool and that he was "probably more out than in".
At the time, the Reds claimed positive talks had been taking place with the player's representative.
However, in January Salah again spoke publicly about his contract situation when he said the two parties were "far away from any progress".
The forward has consistently been linked with a move to Saudi Arabia, with Liverpool rejecting a £150m offer from Al-Ittihad for Salah in 2023.
Saudi Arabia's sports minister Prince Abdulaziz bin Turki Al-Faisal had said the forward would be "a big prize" and they "would love to have him".
However, Liverpool manager Arne Slot said in January he wanted the player to stay and Salah is "wise enough to make the right decision" over his future.
In announcing Salah's new deal, Liverpool posted a picture of the player - who is nicknamed the 'Egyptian King' - sat on a throne on the Anfield pitch with the caption 'more in than out'.
BBC Sport senior football reporter Sami Mokbel
There is a growing expectation at Liverpool that captain Virgil van Dijk will join forward Mohamed Salah in signing a new contract.
Following months of discussions it is understood Van Dijk is extremely close to signing what would be a new two-year contract.
There is an importance to both contracts being two years in length.
The first, and most obvious, benefit to Liverpool is they get to keep two of their most important players.
But it also means they can avoid a repeat of the unsettling narrative that has clouded Arne Slot's first season as manager for at least another year.
Liverpool, barring what would be a remarkable capitulation, are set to win their 20th league title - yet the achievement has come against the backdrop of Van Dijk, Salah and defender Trent Alexander-Arnold approaching the end of their contracts.
The club's hopes of retaining Alexander-Arnold have waned in recent weeks, with the right-back in talks with Real Madrid over a free transfer in the summer.