Southampton centre-back Virgil van Dijk will join Liverpool when the transfer window re-opens on 1 January in a world record £75m deal.
The Netherlands international had been expected to join the Reds last summer after he handed in a transfer request.
But a move fell through when Liverpool apologised for making an alleged illegal approach for the 26-year-old.
The fee is the most ever paid for a defender - Manchester City paid £52m to Monaco for Benjamin Mendy in July.
Van Dijk said in a statement he was "delighted and honoured" to sign for the Merseyside club and accepted he had had a "difficult last few months" at St Mary's.
He was left out of Southampton's squad for their 5-2 Premier League defeat by Tottenham on Tuesday, prompting speculation he was set to leave the club.
"Southampton have agreed a fee that will set a new world record for a defender," the south coast club confirmed on Wednesday.
The player only signed a new six-year contract last year, having joined the Saints from Celtic for £13m in September 2015.
However, Liverpool's interest in the summer prompted a transfer request from the player which saw him forced to train alone by manager Mauricio Pellegrino.
He returned to first team action in September, featuring in a win at Crystal Palace.
Van Dijk's former club Celtic will benefit from the record transfer fee - the Scottish champions are understood to have had a 10% sell-on agreement on any future deal.
Though he will join the club on 1 January, Van Dijk will not be able to register as a player until 2 January so will not be available for Liverpool's trip to Burnley on Monday.
The Anfield club also announced he will wear the number four shirt.
The Van Dijk fee tops the £48m release clause the Reds have agreed for RB Leipzig midfielder Naby Keita, who will move to Anfield next summer.
'Proud to join one of biggest clubs in world' - Van Dijk statement
"Delighted and honoured to have agreed to become a Liverpool FC player. Today is a proud day for me and my family as I join one of the biggest clubs in world football.
"I can't wait to pull on the famous red shirt for the first time in front of the Kop and will give everything I have to try and help this great club achieve something special in the years to come.
"I would also like to take this opportunity to say thank you to Les Reed, the board, manager, players, fans and everyone at Southampton.
"I will always be indebted to the club for giving me the opportunity to play in the Premier League and despite a difficult last few months, I have thoroughly enjoyed my time at Saints and have made friends for life at the club."
BBC Sport's Simon Stone
It has cost Liverpool an additional £15m and half a season, but manager Jurgen Klopp has finally got his man.
Southampton pulled the plug on a proposed £60m deal during the summer, such was their unhappiness at the way they were being railroaded into a transfer.
However, the tell-tale sign Klopp knew who he wanted to address defensive deficiencies and wouldn't be changing his mind came through the fact Liverpool did not try for an alternative.
After conceding 23 goals in 20 Premier League games so far, Klopp has been reminded often enough he needed to strengthen his defence.
Now he has done it, he will hope his side can retain their attacking brilliance and close the gap to Manchester United and Chelsea and, in time, start to challenge at the very top of the Premier League table.
Liverpool's desire to sign Van Dijk comes through the size of the fee, which Manchester City - who were also interested - were not prepared to match.
As for Southampton, they have got rid of a player who clearly had no wish to remain on the south coast and generated the funds that will allow them to reinforce a squad that has struggled for the past 12 months and led to speculation manager Mauricio Pellegrino is on dodgy ground.
A world record fee - and £171.5m on Saints players
France full-back Benjamin Mendy moved from Monaco to Manchester City in 2017, with Kyle Walker joining Pep Guardiola's side from Tottenham in the same year.
David Luiz joined Paris St-Germain from Chelsea in 2014, while John Stones arrived at City from Everton in 2016.
Van Dijk will become the sixth Southampton player signed by Liverpool since 2014 - at a total cost of £171.5m.
The other five to have joined are: Sadio Mane (£34m), Adam Lallana (£25m), Dejan Lovren (£20m), Nathaniel Clyne (£12.5m) and Rickie Lambert (£5m).
'Crazy money' - reaction
Ex-England and Southampton striker Alan Shearer on BBC Radio 5 live
Southampton have got one hell of a deal. Van Dijk is a good player, yes, but for £75m? No, he's not worth it at all.
Southampton could have named any price they wanted. They knew Liverpool were absolutely desperate for a centre-half. Everyone is aware they are desperate - we have seen them come up short several times this season.
When Liverpool try and sign a goalkeeper - which they also desperately need - they will find the same thing.
We've been saying it for a number of years now - that transfer fees have gone through the roof - and this one has taken it to another level.
Former Southampton manager Harry Redknapp on 5 live
It seems inevitable for Southampton to lose top players every year. It must be disappointing to see so many players leave. Their scouting system has been good - they tend to sell and make profits but eventually that will back fire. They're in a relegation battle this season - they're going to have to scrap.
It's crazy money for a central defender. When he was at Celtic, a lot didn't think he was good enough for a top-six club at that time. Southampton took a chance and suddenly his fee has gone through the roof. It's a crazy fee. Southampton have been good at finding replacements, but whether they can do that again is now the question.
Ex-Southampton defender Francis Benali on 5 live
It has always been on the cards. It was just a case of when and for how much. Virgil has been outstanding at Southampton. I looked at him as a player who could quite literally go to any club in the world. He is that good.
I would say since he came back into the side this season he hasn't quite been firing on all cylinders and looking quite as good as he was before the injury, but that could be said for the whole side.
Your response on #bbcfootball
Tom McCarron: £75m for Van Dijk? Football has officially gone mad; that's 1 Gareth Bale or 2 Mohamed Salah's or 315 Luke Chadwicks
David Jennings: Just got to say... £75m... really?!
Ajay Yadaz: Liverpool signing Virgil van Dijk for £75m tells us something is wrong with modern football. Amazed, gutted, pathetic.