MADRID (Reuters) - Sevilla have signed a three-year contract with Mexican striker Javier Hernandez (Chicharito) from West Ham.

"Sevilla and West Ham have reached an agreement for the transfer of Javier Hernandez, known as Chicharito," the club said in a statement. "The striker has signed a three-year contract."

Hernandez's chances of playing a major role have slipped after Frenchman Sebastien Haller joined Eintracht Frankfurt in July. West Ham said in a statement: "The club would like to thank Chicharito for his contribution and wish him the best in his future career."

The 31-year-old, who has also defended Manchester United and Bayer Leverkusen, is the best scorer in Mexico's history with 51 goals in 108 matches.

Hernandez will return to La Liga, where he played for Real Madrid in the 2014-2015 season, and will strengthen the attacking line of the Andalusian club, especially after the departure of French Wissam Ben Yedder to Monaco, and Pablo Sarabia to Paris Saint-Germain.

Former Spain coach Gulen Lopetegui made a good start in the new season with two wins and a draw in one of the first three stages.