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.
Bournemouth forward Jordon Ibe was robbed at knifepoint when thieves rammed his car just four days after suspected gunmen allegedly threatened West Ham striker Andy Carroll.
West Ham United are determined to keep hold of Dimitri Payet, co-chairman David Sullivan has said, after media reports suggested several clubs across Europe have registered an interest in the French midfielder.
Juventas striker Simone Zaza has joined Premier League side West Ham United on a season-long loan.
France playmaker Dimitri Payet gives West Ham a huge boost ahead of the new Premier League season by telling the club he is "100 per cent staying" with the Hammers.
Dimitri Payet is worth not a penny less that 50 million pounds, West Ham United co-chairman David Gold has said, but even that might not be enough to prise the France midfielder away from the London club.
Manchester United manager Louis van Gaal put on a brave face and refused to blame an attack on his team's bus for the serious setback to his side's Champions League hopes at West Ham United.
WWE superstar HHH has pledged his allegiance to West Ham after being asked to name his favourite Premier League team.