ST. PETERSBURG, Fla. — The Baltimore Orioles‘ long run of mound misery is over.

Dylan Bundy helped Baltimore avoid a dubious pitching record, throwing seven solid innings as the Orioles beat the Tampa Bay Rays 8-3 Saturday.

The Orioles had given up at least five runs in 20 straight games, matching the major league mark set by the 1924 Philadelphia Phillies. Baltimore went 6-14 over the stretch.

“It’s one thing to identify a problem, it’s another things to solve it,” Orioles manager Buck Showalter said. “We’re in the business of trying to solve issues. You can start by looking at them and realizing that you have them, but I don’t think anybody’s got to tell us we’ve had problems with our starting pitching.”

Bundy (8-6) allowed three runs and five hits in seven innings. Relievers Donnie Hart and Mychal Givens combined to keep the Rays scoreless over the final two innings.

“The story of the game was, probably, Dylan Bundy,” Rays manager Kevin Cash said. “He did a nice job kind of quieting our hot bats.”

Bundy struck out eight and walked four.

“He did what he does best, he was attacking the hitter with the fastball and changeup and slider,” Orioles catcher Welington Castillo said. “It was great to see him do that.”

Jose Alvarado (0-3) walked the only batter he faced, Seth Smith, leading off the seventh. He was replaced by Jumbo Diaz, who gave up a two-run double to Mark Trumbo and Trey Mancini‘s two-run homer that put Baltimore ahead 7-3.

“It starts with a leadoff walk … I sound like a broken record saying that,” Cash said.

Baltimore also got a second-inning, two-run homer from Castillo and Adam Jones hit a solo shot in the third.

Corey Dickerson and Evan Longoria homered on consecutive pitches in the third for the Rays.

Rays catcher Wilson Ramos singled in four at-bats in his season debut. The 2014 NL All-Star with Washington missed the first 76 games this season after right knee surgery.

Tampa Bay rookie Jake Faria wound up with a no-decision after winning each of his first three starts in the majors. He permitted three runs and five hits over six innings.

Faria had pitched at least 6 1/3 innings in his first three starts, allowing one run each time.

The Rays tied it at 3 in third when Dickerson had a two-run drive before Longoria went deep on Bundy’s next pitch.

Tampa Bay set a team mark with their major league-leading 10th set of back-to-back homers this season. Tampa Bay has sixth straight multihomer games, one off the franchise high.

TRAINER’S ROOM

Orioles: Closer Zach Britton (left forearm strain) could move his rehab assignment from Class-A Delmarva to Double-A Bowie on Monday.

Rays: RHP Brad Boxberger (strained flexor mass) was expected to be reinstated from the disabled list this weekend but has oblique discomfort and will have a Sunday bullpen session.

SMITH’S SURPRISE

NFL Hall of Famer Emmitt Smith surprised his sister Marsha Smith-Hill, who threw the ceremonial first pitch as part of a cancer survivor salute, by joining her on-the-field.

MORE MANCINI

Mancini has 13 home runs, tying Eddie Murray (1977) and Curt Blefary (1965) for the most by Baltimore rookie before the All-Star break.

UP NEXT

Orioles: RHP Chris Tillman (1-5, 8.39 ERA) makes his 10th start since returning from right shoulder bursitis in the series finale Sunday. He allowed five runs and eight hits in four-plus innings Tuesday, but Baltimore’s 6-5 comeback win over Cleveland enabled him to avoid losing a sixth straight start.

Rays: RHP Jake Odorizzi (4-3, 3.78 ERA) will look Sunday to avoid tying Wilson Alvarez‘s team record set in 1998 of allowing a homer in 11 consecutive appearances.