Nick Markakis hit a two-run homer in the third inning that preceded a solo shot by Steve Pearce. Baltimore would hit three consecutive homers in the fifth inning in its 9-1 win over Tampa Bay. (Rob Carr/Getty Images)

The Orioles figured out a simple way Monday night to bust out of an offensive skid that cost them three games at Wrigley Field over the weekend.

Get home — and start homering. And keep homering, in consecutive at-bats, if possible, until you’ve beaten the opposition into submission and set a little franchise history.

In a 9-1 victory over the Tampa Bay Rays on Monday night, Baltimore had 14 hits -- including five home runs by five different players — to snap its three-game losing streak.

Perhaps more impressive, the first two homers were hit back-to-back in the third inning, and the other three were hit consecutively in the fifth. It was the first time in the team’s 60-year history in which they have had two consecutive homers and three consecutive homers in the same game.

Take that, offensive skid.

“The hits, the runs, all of it,” said shortstop J.J. Hardy, who was in the middle of the three straight homers in the fifth. “Slumped a little bit there in Chicago, but it’s nice to come out, first game this homestand, and score some runs.”

Hardy said there may have been some panic among the fan base after three lackluster showings over the weekend, but not within the clubhouse.

“I think everyone else is pressing a lot more than we were,” Hardy said. “We had three rough games at Wrigley, but honestly we came in today, and I don’t feel like anyone was even thinking about that.”

With the win, the American League East-leading Orioles (74-55) maintained their six-game lead over the New York Yankees in the division and improved to 16-5 in their last 21 games at Camden Yards. They’ve now beaten the Rays (64-67) in nine of 13 matchups this season.

“It’s good to be back home,” said Nick Markakis, who snapped an 0-for-21 skid with a third-inning home run. “We had a long road trip, a tough road trip as far as we’re concerned. But it’s something that can get us going. A long homestand here, it’s a good way to start it off.”

With the first day of school Monday for many Baltimore-area kids, the announced crowd was just 15,516, the smallest at home since the team drew 13,478 against the Texas Rangers on July 2.

But those who showed witnessed a stunning power display by the most prolific home run-hitting team in the major leagues. The Orioles have hit 168 home runs this year, 24 ahead of the Toronto Blue Jays for the most in the AL.

“Everyone knew it was only a matter of time before they broke out,” said Orioles starter Chris Tillman, who allowed just one unearned run, three hits and two walks in seven innings. “And I’m glad it came tonight.”

After managing just four runs in a sweep by the Chicago Cubs over the weekend, the Orioles scored six in one inning Monday — with five coming on three swings in a nine-pitch sequence.

The last time the Orioles had multiple back-to-back homers was May 27, 2008 against the Yankees when Kevin Millar and Ramon Hernandez and then Luke Scott and Millar achieved the feat.

— Baltimore Sun