West Ham have revealed they have reached agreement for Carlos Tevez to leave Upton Park and complete his protracted move to Manchester United.
Tevez (right) could soon join Patrice Evra at Old Trafford
The settlement ends the threat of High Court action between West Ham and Tevez's representative Kia Joorabchian.
West Ham will receive a £2m fee for Tevez's registration and the move has been approved by the Premier League.
The 23-year-old Argentine striker is understood to have passed a medical and trained with United on Friday morning.
All sides were keen for the matter to be settled ahead of a proposed court date on 22 August and the closure of the transfer window at the end of the month.
Tevez's switch had stalled over who will be paid the transfer fee.
The Premier League and West Ham said the Hammers should receive the fee but companies MSI and Just Sports Inc, which belong to Joorabchian, said they owned the striker's economic rights.
Tevez arrived with fellow countryman Javier Mascherano at West Ham last August, and his outstanding form towards the end of last season kept Alan Curbishley's side in the Premiership.
West Ham chairman Eggert Magnusson says he's pleased the deal has been resolved through 'common sense', but that's been in pretty short supply during this sorry saga
BBC sports news correspondent James Munro
But there was always a shadow hanging over the deal after West Ham were fined £5.5m over the transfers of Tevez and Mascherano.
The club was found guilty of acting improperly and withholding vital documentation over the duo's ownership, but crucially avoided a points deduction.
West Ham said in a statement: "The settlement ends the current litigation taking place between the respective parties and provides for a £2m fee to be paid to West Ham.
"The agreement confirms that West Ham do have a valid player's contract with Carlos Tevez and hold the registration of the player. This will be released once the agreed fee has been paid to the club.
"The terms of the settlement are consistent with undertakings given by West Ham United to the Premier League and the rules of The Football Association."
West Ham chairman Eggert Magnusson added: "I am obviously pleased that we have finally reached the end of this saga through agreement and common sense.
"All parties involved can now move on and truly focus on the new season."
The Premier League has also given their approval, clearing the way for Sir Alex Ferguson to complete the drawn-out Tevez deal.
A statement read: "The decision of the board, having received leading counsel's opinion, is that the agreement reached is compliant with the rules of the Premier League and consistent with the undertakings given by West Ham United to the Premier League board at various times since 27 April 2007.
"This will lead to the cancellation of Tevez's registration, thereby releasing him to join another club in due course."
And a statement issued on behalf of Joorabchian, MSI Group Limited and Just Sport Inc, said: "We are delighted that a settlement has been reached between all parties to secure Carlos Tevez's move from West Ham United to Manchester United.
"The agreement brings an end to the legal proceedings started by us against West Ham United in the High Court last week.
"Our primary concern has always been to resolve this issue amicably and to allow Carlos to pursue his ambition to play for Manchester United.
"Carlos is looking forward to being a Manchester United player and his ambition is close to being achieved."