Attacking midfielder Pablo Hernandez scored in the fifth minute of injury time on Saturday to give Leeds a 2-1 win over the A-League's Western Sydney Wanderers.

The 34-year-old Spaniard cut in from the right side of the goal, fought off several challenges and drilled the ball into the corner of the Wanderers net.

More Images
Leeds United's Pablo Hernandez, left, gets past Western Sydney Wanderers' Fabian Monge during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Attacking midfielder Pablo Hernandez scored in the fifth minute of injury time on Saturday to give Leeds a 2-1 win over the A-League's Western Sydney Wanderers.

Leeds United's Pablo Hernandez, right, is tackled by Western Sydney Wanderers' Keanu Baccus, during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Teen midfielder Mateusz Bogusz scored from the edge of the box in the ninth minute to give Leeds the early lead. The 17-year-old took a pass from winger Jack Harrison and launched the ball into the top left corner of the net.

Leeds United's Mateusz Bogusz, center, is congratulated by teammates after scoring against Western Sydney Wanderers during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports

Leeds United's Stuart Dallas, center, holds his head after missing a shot against the Western Sydney Wanderers during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Stuart Dallas, center, holds his head after missing a shot against the Western Sydney Wanderers during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Patrick Bramford, left, and Western Sydney Wanderers' Tarek Elrich compete for a high ball during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Patrick Bramford, left, and Western Sydney Wanderers' Tarek Elrich compete for a high ball during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Jack Harrison, right, kicks past Western Sydney Wanderers' Bruce Kamau during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Jack Harrison, right, kicks past Western Sydney Wanderers' Bruce Kamau during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Mateusz Bogusz, left, competes for the ball with Western Sydney Wanderers' Tass Mourdoukoutas during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Mateusz Bogusz, left, competes for the ball with Western Sydney Wanderers' Tass Mourdoukoutas during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

The Wanderers, managed by former German international Markus Babbel, leveled the score at 1-1 in the 48th minute when midfielder Kwame Yeboah converted a perfect through ball from Keanu Baccus.

Leeds United's Pablo Hernandez, left, gets past Western Sydney Wanderers' Fabian Monge during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Pablo Hernandez, left, gets past Western Sydney Wanderers' Fabian Monge during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Teen midfielder Mateusz Bogusz scored from the edge of the box in the ninth minute to give Leeds the early lead. The 17-year-old took a pass from winger Jack Harrison and launched the ball into the top left corner of the net.

Bogusz limped off in the 82nd and later had strapping placed on his left leg.

Leeds, which plays in English soccer's second-tier Championship, lost 4-0 to Manchester United on Wednesday in Perth.

Leeds United's Pablo Hernandez, right, is tackled by Western Sydney Wanderers' Keanu Baccus, during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Pablo Hernandez, right, is tackled by Western Sydney Wanderers' Keanu Baccus, during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports

Leeds United's Mateusz Bogusz, center, is congratulated by teammates after scoring against Western Sydney Wanderers during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Mateusz Bogusz, center, is congratulated by teammates after scoring against Western Sydney Wanderers during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Stuart Dallas, center, holds his head after missing a shot against the Western Sydney Wanderers during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Stuart Dallas, center, holds his head after missing a shot against the Western Sydney Wanderers during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Patrick Bramford, left, and Western Sydney Wanderers' Tarek Elrich compete for a high ball during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Patrick Bramford, left, and Western Sydney Wanderers' Tarek Elrich compete for a high ball during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Jack Harrison, right, kicks past Western Sydney Wanderers' Bruce Kamau during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Jack Harrison, right, kicks past Western Sydney Wanderers' Bruce Kamau during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Mateusz Bogusz, left, competes for the ball with Western Sydney Wanderers' Tass Mourdoukoutas during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)

Leeds United's Mateusz Bogusz, left, competes for the ball with Western Sydney Wanderers' Tass Mourdoukoutas during their friendly soccer match in Sydney, Australia, Saturday, July 20, 2019. (AP PhotoRick Rycroft)