Valencia opened the scoring in only the second minute with a close-range header, claiming his first goal of the season, but Cristiano Ronaldo equalised and Nani provided the assist for Helder Postiga to put the hosts in front.
Nani was replaced in the 73rd minute and Valencia came off late on after Ecuador turned things around to win a topsy-turvy game.
Javier Hernandez was unable to inspire Mexico to victory in a World Cup qualifier with Jamaica as a 0-0 draw ended a 19-match winning streak at the Azteca Stadium. Jobi McAnuff hit a post for the Reggae Boyz but Mexico had enough chances to win and their display drew boos from the fans. Chicharito was denied by a brave block by Donovan Ricketts in the final seconds.
Robin van Persie was withdrawn at the break, with Arjen Robben taking his place, during Holland's 1-1 draw with Italy. Marco Verratti's stoppage-time leveller earned a share of the spoils for the Azzurri.
CHILE v Egypt: Angelo Henriquez
FRANCE v Germany: Patrice Evra
JAPAN v Latvia: Shinji Kagawa
Macedonia v DENMARK: Anders Lindegaard
Malta v N.IRELAND: Jonny Evans
MEXICO v Jamaica: Javier Hernandez
NETHERLANDS v Italy: Robin van Persie
PORTUGAL v ECUADOR: Nani, Antonio Valencia