Ubaldo Jimenez walked off the mound to a standing ovation, a rare reception for the beleaguered Baltimore Orioles' right-hander.

Jimenez was stellar in his first start since May 22, Mark Trumbo homered for the second consecutive day and the Orioles took a three-game series against the St. Louis Cardinals with a 8-5 victory Sunday.

"He knew what we needed and he delivered it," Orioles manager Buck Showalter said about Jimenez. "We basically had a day game yesterday and we're in a stretch with 20-21 games in a row. Real proud of everybody today. There was a lot of intensity there."

Baltimore homered 10 times while winning two of three from the Cardinals to improve to .500 (34-34). It was the first time the Orioles won a three-game series since May 29-31 against the Yankees.

Jimenez (2-2) has struggled most of the season and relinquished his starting role to Alec Asher, who also failed to hold down the job. Jimenez will likely stay in the rotation after allowing just two runs on four hits with three strikeouts and two walks over seven innings.

"I just want to fight," Jimenez said. "Doesn't matter where I am, I'm going to try to do the best I can. It felt good to be able to be there for the team today."

Seth Smith and Trey Mancini homered to start the first and second innings, respectively, for Baltimore. Welington Castillo also had a solo shot in the fifth that gave the Orioles a 7-2 lead.

Brad Brach picked up his 12th save for Baltimore.

Dexter Fowler homered for the fourth consecutive game with a two-run shot in the eighth, and three batters later, Yadier Molina had solo home run that pulled the Cardinals to 8-5.

Stephen Piscotty also hit a pair of solo homers for the Cardinals, who have lost five of six.

"We need to get the ball in the air and they were able to keep us from doing it on a consistent basis," Cardinals manager Mike Matheny said.

St. Louis' Lance Lynn (5-4) allowed seven runs and nine hits with five strikeouts and a career-high four home runs over 4 2/3 innings.

"It's baseball," Lynn said. "You go through times when it's going well and times when it's going better than you think."

Manny Machado's RBI single in the sixth gave Baltimore an 8-2 lead.

THREE BAGGERS

Adam Jones and Trey Mancini each hit a triple in the fifth inning. It was Jones' first triple since 2015 and the first of Mancini's career. The Orioles had not hit two triples in an inning since Aug. 14, 2009.

LONG BALL

The Orioles joined the New York Yankees as the only teams in the majors with six players that have 10 or more home runs.

TRAINER'S ROOM

Cardinals: 2B Kolten Wong (right triceps strain) has been "resting and strengthening" after going on the 10-day DL on Thursday, manager Mike Matheny said. Wong is batting .304 in 45 games (125 at-bats).

Orioles: SS J.J. Hardy (right wrist contusion) left the game in the sixth after being hit by a pitch. ... Reliever Darren O'Day (right shoulder strain) will throw his first bullpen session Monday.

UP NEXT

Cardinals: RHP Mike Leake (5-6, 3.14) is looking to snap a four-game losing streak when he starts the series opener Tuesday against Phillies RHP Jeremy Hellickson (5-5, 4.91).

Orioles: RHP Dylan Bundy (7-5, 3.29) has been Baltimore's most effective starter and throws Monday against first-place Cleveland and RHP Corey Kluber (5-2, 4.15).