Rafael Benitez has signed a new five-year contract at Liverpool, ending a 17-month power struggle with the club's board.
The future of the former Valencia boss, who led Liverpool to Champions League glory in 2005, had been in doubt since he revealed in January that he had rejected the club's first offer of a new contract.
Reports suggested that control over the Reds' transfer activity proved to be the sticking point for Benitez but the Merseyside club announced on Thursday evening that a new deal had been agreed that should keep him at Anfield until June 2014.
"My heart is with Liverpool Football Club, so I'm delighted to sign this new deal," Benitez said. "I love the club, the fans and the city and with a club like this and supporters like this, I could never say no to staying.
"I always made clear I wanted to be here for a long time and when I complete my new contract it will mean I have spent over a decade in Liverpool."
Benitez took over in 2004 and despite failing to end their wait for the top-flight title stretching back to 1990 he has re-established Liverpool as a European powerhouse, adding a final appearance in 2007 to the triumph two years earlier.
The 48-year-old said: "The club is greatly respected around the world due to its incredible history and tremendous heritage. It is my aim to uphold those values and help create a new chapter in our history.
"Throughout this process, I would like to thank the owners for their hard work in finalising the deal. All of us at the club want the same thing, which is to be successful by winning major trophies."
Last week Liverpool reached the quarter-finals of the Champions League with a 5-0 aggregate rout of Real Madrid and on Saturday, Benitez's men thrashed Premier League leaders Manchester United 4-1 at Old Trafford.
"It is wonderful news Rafa has made a long-term commitment to the club," American co-owner Tom Hicks said. "Since he became manager he has been responsible for the great progress we have made.
"I know he will continue to build on his achievements as he has a tremendous hunger and desire to bring more success to the club, success our fans and everyone connected with the club deserves."
As well as winning the Champions League, Benitez also lifted the FA Cup with Liverpool in 2006.
Co-Chairman George Gillett added: "With Rafa continuing to manage the team, we can look forward to more great football and success on the pitch. He has special abilities and qualities which are admired here at the club and around the world.
"Coming after our excellent wins over Real Madrid and Manchester United, this gives us great momentum going into the final stages of the season."
It is no surprise that Benitez agreed his new contract within a couple of weeks of chief executive Rick Parry's announcement that he would be leaving the club in the summer.
The two have had a sometimes strained relationship, with Benitez angry that many of his transfer negotiations seemed subject to the chief executive's opinion.
He had criticised the slowness of some deals, in which players he wanted were lost, with the key issue being the failure to sign Gareth Barry last summer, when the club refused to match Aston Villa's reported £18million asking price.
At first Hicks and Gillett rejected Benitez's demands to have control over transfers, and it is believed they even asked Villa's American owner Randy Learner for advice and confirmation that the sort of deal Benitez wanted was similar to Martin O'Neill's.
Benitez has continually been linked with Real Madrid, who will probably have a vacancy in the summer when Juande Ramos' short-term contract ends, but those rumours can now be put to bed.