The last time the Orioles and Astros crossed paths, Houston's pitching staff embarrassed the big-swinging O's lineup with a major league-record 52 strikeouts in a three-game series at Minute Maid Park.

Whether the Orioles had a score to settle or just needed to bounce back from a two-game sweep by the rival Boston Red Sox, they took out their frustrations Thursday night with a six-homer performance and a resounding 13-5 victory before an announced 20,288 at Camden Yards.

Mark Trumbo crushed a three-run shot off rookie starter Joe Musgrove in the first inning to begin the homerfest and J.J. Hardy had his second two-homer game of the season. Hardy's second touched off a meteor shower in a five-run sixth inning that included back-to-back home runs by Manny Machado and Chris Davis.

Davis, who has been trying to pry himself out of a long hitting slump, landed a ball on Eutaw Street for the second night in a row. It was his 10th career Eutaw Street blast and the 89th overall in the history of Oriole Park. He followed in his next at-bat with his 27th homer of the year, which landed deep in the center-field bleachers and gave him his first multihomer game of the year.

It has been a bumpy ride for the Orioles offense during the second half of the season, so it's probably too soon to consider that the inconsistent lineup might be turning a corner. But 18 hits is a good way to build confidence for the rest of this four-game series.

“I don't want to say ‘need,' but it definitely was nice,” Hardy said. “We haven't been swinging the bats all that great, so to bust out like that tonight, it hopefully keeps going and we can keep that confidence.”

It seemed that just about everyone in the Orioles lineup wanted to make sure that Kevin Gausman finally got some run support. Every batter but Matt Wieters had at least one hit before Mychal Givens replaced Gausman in the seventh inning. Hyun Soo Kim hit safely in four of his five at-bats, raising his team-leading batting average to .329.

“I know we don't hit for him,” Hardy said, “but maybe this will start something for the future and every fifth day we can go out there and score like we did tonight.”

Gausman (4-10) pitched well while the game was in doubt. He allowed just two runs through the first five innings, but allowed a long home run to Alex Bregman in the sixth and a two-run shot to A.J. Reed in the seventh. He allowed five runs (four earned) on seven hits over 62/3 innings and struck out eight.

Gausman was mostly satisfied with his performance.

“It was good. I obviously wish I would have finished a little bit better,” he said. “When you get a lead like that, you're trying to make them not walk guys, so I think I crowded the plate a little too much later in the game. I was knocking myself for walking the leadoff guy in the seventh, but it's just something you have to deal with. I threw some tough pitches that they laid off, a couple of pitches that were too good late to Bregman and Reed. Those guys are two good young hitters. They got some juice, definitely.”

The win moved the Orioles (67-53) back into a second-place tie with the Red Sox, who lost Thursday afternoon to the Detroit Tigers at Comerica Park. Both teams now trail the idle Toronto Blue Jays by 11/2 games.

The 13-run outburst equaled the Orioles' biggest offensive performance of the season. They scored 13 runs June 1 against the Red Sox.

Hardy's big night: Hardy doubled in his first at-bat and homered in his next two, giving him 10 total bases in the game. His previous high this season was in his other two-homer game on April 12 against the Red Sox. Hardy's career high for total bases is 12, achieved May 6, 2012, in a five-hit game against the Red Sox.

Trumbo's 35th: The Orioles opened up with three hits off Musgrove in the first inning, the last a signature three-run shot into the left-field bleachers by Trumbo, who has a career-high 35 home runs. Trumbo had 34 homers for the Los Angeles Angels in 2013 and needed 620 at-bats to get them. This year, he got to 35 in his 465th at-bat and moved back ahead of Edwin Encarnacion into sole possession of the major league home run lead.

peter.schmuck@baltsun.com

twitter.com/SchmuckStop