Barcelona have agreed a transfer fee with Liverpool for Javier Mascherano and the Argentine midfielder is expected in Spain for a medical this weekend, the clubs said on Friday.
The Argentina captain has been linked with a move away from Liverpool for much of the summer with Barcelona as well Inter Milan keen on his services.
Liverpool coach Roy Hodgson had hoped the 26-year-old would stay on but had left the player out of their recent matches against Manchester City and Trabzonspor as speculation over a transfer grew.
Barcelona said on their website the two clubs had agreed on a transfer that would send Mascherano to the Catalan club for four seasons.
"The deal depends on the utility star passing a medical at Barca and then signing the contract. Mascherano will arrive in Barcelona this weekend," the club said.
Spanish media reported the deal is worth around 22 million euros ($28 million).
English Premier League club Liverpool confirmed on their website a transfer fee has been agreed.
"The Spanish club have now been given permission to speak to the Argentina midfielder," Liverpool said on their website.
Mascherano would become Barca's third signing of the closed season after the arrivals of Spain striker David Villa and Brazilian full back Adriano Correia.
He would help fill the gap left by the sale of defensive midfielder Yaya Toure to Manchester City.
Barca are still locked in negotiations with AC Milan to sell Swedish striker Zlatan Ibrahimovic before the end of the transfer window. They begin the defence of their La Liga title away to Racing Santander on Sunday.
Rescue ops intensify in Leh; 132 dead, 600 missing
Bopanna-Qureshi stun Bryan brothers in quarters
Pennetta upsets injured Stosur at San Diego
Kashmir remains calm; curfew relaxed
Pak seeks voice samples of 26/11 suspects