The Angels continue to play their best baseball at a time when it’s almost futile.

The Angels completed a two-game sweep of the playoff-bound Padres on Wednesday in San Diego, winning 5-2 keep their faint mathematical hopes for the postseason alive.

The Angels (26-31) have won six of seven and 14 of 20. They trail the Houston Astros and Toronto Blue Jays by three games apiece, pending each of their games later Wednesday. The Angels have three games left against the Dodgers, following an off day Thursday. The Astros and Blue Jays each have four games left after Wednesday.

Although the Angels’ chance of making the postseason is still minuscule, they can take some solace in the fact that they’re finally playing their best baseball.

On Wednesday, they took the lead with a four-run second inning that included three homers. Shohei Ohtani hit his first homer of the season against a lefty, a two-run shot to tie the game, then Justin Upton hit a go-ahead homer.

Ohtani and Upton had been near the top of the list among the hitters whose struggles helped the Angels dig such a deep hole.

The Angels also got solid pitching again.

Jaime Barria gave up a two-run homer to Eric Hosmer in the first inning, and then pitched a perfect second after the Angels gave him a lead.

Manager Joe Maddon pulled Barria after a leadoff double in the third and brought in Patrick Sandoval.

Sandoval retired the next eight hitters, including five with strikeouts, to finish with three scoreless innings.

Sandoval has pitched three times in relief since returning from Long Beach, allowing four runs in 11 1/3 innings.

Matt Andriese followed him to the mound and pitched two scoreless innings, followed by Mike Mayers working a scoreless eighth. Mayers pitched for the third day in a row and fourth time in five days. He faced six batters apiece Monday and Tuesday.

After Mayers gave up a leadoff single in the ninth, Felix Peña finished off the victory.

tinyurlis.gdu.nuclck.ruulvis.netshrtco.de