BALTIMORE — During a miserable stretch that dropped them into a last-place tie in the AL East, the Baltimore Orioles endured a familiar scenario: A poor outing by their starting pitcher put them in a quick hole, and an overworked bullpen allowed the deficit to grow.

The Orioles flipped the script on the St. Louis Cardinals in a 15-7 victory Saturday.

Jonathan Schoop homered twice and drove in four runs, Manny Machado went deep in a seven-run second inning against Adam Wainwright and the Orioles cruised after building a 12-3 lead in the fourth inning.

"When your starter goes out and lays an egg you're going to have a hard time winning the game," Wainwright said. "I pitched terrible and we were behind the 8-ball right away."

Adam Jones and Mark Trumbo got Baltimore started with successive first-inning shots, and Schoop finished the Orioles' long-ball display with drives in the fourth and seventh .

In dropping eight of their previous nine games, Baltimore absorbed lopsided losses of 8-2, 16-3, 14-3 and 11-2. In this one, the Orioles took advantage of a struggling starting pitcher and added to the advantage against a trio of relievers.

Wade Miley (3-4) picked up his second win since April 14 despite allowing six runs, five earned, in 5 2/3 innings.

Afterward, he acknowledged that his job was made easier by the performance of Baltimore's offence.

"It put us in a situation where I can go out there and kind of relax and try to get outs," the left-hander said. "Obviously they scored some runs, but at the same time, we scored more than they did."

Wainwright (7-5) gave up nine runs and seven hits, including three home runs, over 1 2/3 innings — the shortest of his 268 career starts. The nine runs and three homers matched the most he's allowed in any outing.

"This is the last park you want to pitch in if you're throwing the ball right down the middle with not much action on it," Wainwright said. "Today was pathetic."

It was the 11th loss in 16 games for the Cardinals, who got home runs from Paul DeJong, Yadier Molina and Dexter Fowler.

Baltimore led 2-1 before sending 11 batters to the plate in the second. J.J. Hardy and Trey Mancini each hit a two-run double, Schoop singled in a run and Machado delivered a two-run homer.

After the Orioles built a nine-run cushion, Molina hit a solo homer in the fifth and Fowler connected with two on in the sixth before Mychal Givens struck out Eric Fryer with the bases loaded.

Not long after that, Baltimore celebrated a blowout victory of its own.

"It was really good, a really good feeling," Schoop said. "Hopefully we can keep it up."

FIELDING GEM

Machado snared a grounder down the line in the eighth inning and drifted past the coaching box before rifling a throw that got Jedd Gyorko at first base.

"To make it even better, I had a good look at it. It's probably a foul ball," Orioles manager Buck Showalter said.

SEEN 'EM ALL

The Orioles were the only major league club that Wainwright had not faced over his 12-year career with the Cardinals. Baltimore remains one of only five teams he has never beaten (along with the Yankees, Twins, Indians and Rangers).

TRAINER'S ROOM

Cardinals: RHP Michael Wacha appears healthy enough to make his next start. "He's in doing his normal two-days after workout. It seems like everything was going fine," manager Mike Matheny said.

Orioles: 1B Chris Davis (oblique strain) will likely be sidelined through the All-Star break, Showalter said. ... INF Ryan Flaherty (right shoulder inflammation) has started a throwing program at the Orioles minor league facility in Sarasota, Florida. ... RHP Mike Wright (shoulder) received a cortisone injection in his shoulder Friday and will be shut down for at least three days.

UP NEXT

Cardinals: RHP Lance Lynn (5-2, 2.69 ERA) starts the series finale. He's coming off his third scoreless start of the season, on Tuesday in Milwaukee.

Orioles: RHP Ubaldo Jimenez (1-2, 6.71 ERA) makes his first start since May 22. He's made four relief appearances since then, allowing eight runs in 13 2/3 innings.

___

More AP baseball: https://apnews.com/tag/MLBbaseball