The 30-year-old, who was part of the Argentina squad which won the World Cup in 2022 and the 2021 and 2024 Copa America titles, was available on a free transfer following the expiry of his contract at Real Betis.
Lopetegui, who previously coached Wolverhampton Wanderers in the Premier League and will take charge of West Ham on July 1, replaces David Moyes, who left the London club this month.
Manchester City go into their last match against West Ham with a two-point lead, knowing that victory would secure the title for an unprecedented fourth successive season.
The single point leaves Liverpool third in the table on 75 points, one behind defending champions Manchester City, who have two games in hand.
The 19-year-old had only just come on as a substitute when he collided with team-mate Edson Alvarez at the London Stadium during an eventual 2-0 defeat by capital rivals Fulham.
A Ben White own goal put the home side in front before strikes from Mohammed Kudus and Jarrod Bowen early in the second period put the tie beyond doubt.
Arsenal have signed England international Declan Rice on a long-term contract from West Ham United, the north London club said on Saturday.
Liverpool boss Jurgen Klopp said on Tuesday he has taken pleasure in West Ham's revival under David Moyes as it prevented him from becoming the oldest manager in the Premier League.
The draw meant Chelsea have now won only one of their last seven league games - and they have not won away since October. They stayed ninth in the table, nine points behind fourth-placed Newcastle who have played a game less.
West Ham have appoint former Everton and Manchester United boss David Moyes as their new manager.
Premier League strugglers West Ham United come back from two goals down to beat Tottenham Hotspur 3-2 at Wembley Stadium.
West Ham United captain Mark Noble is to undergo surgery for a long-standing abdominal injury and will miss the last two Premier League games of the season, the club said on Thursday.
West Ham United manager Slaven Bilic has called on his players to drop their egos and work as one in order to end their woeful run of five consecutive Premier League defeats when they host relegation-threatened Swansea City on Saturday.
Marseille's star recruit Dimitri Payet made his debut on Tuesday but it was Brazilian Doria who booked the team's French Cup quarterfinal berth with a 2-1 extra time win over Lyon.
After selling Dimitri Payet to Olympique de Marseille for 25 million pounds ($31.2 million), West Ham United are offering fans a cut-price deal to get the French forward off their backs as well.
Olympique de Marseille have signed France forward Dimitri Payet on a 4-1/2 year contract from West Ham United after they agreed a transfer fee of 25 million pounds ($31.49 million) on Sunday.
French international Dimitri Payet's refusal to play for West Ham has led to his car being vandalised according to English tabloid 'The Daily Mail' on Friday.
West Ham United midfielder Dimitri Payet has been granted extra time off to help the Frenchman recapture the scintillating form he displayed last season and to help cope with the Premier League's demanding festive schedule.
Manchester United's Jose Mourinho is fond of setting landmarks as a manager but becoming the first individual to be sent off twice in this season's Premier League is not one he will covet.