Monday’s 7-2 Astros win made little sense in the context of what came before it. The worst offense in the majors finally busted out against one of the greatest pitchers in the game: the Mariners’ Felix Hernandez.

The Astros entered the game hitting .192. The righthanded ace they were facing came in with a 1.91 ERA on the season and a 2.00 ERA against the Astros lifetime.

Why would this be the night the bats come alive?

With the help of dairy, Matt Dominguez’s two-run homer opened the scoring in the fifth inning. The Mariners tied at 2 in the bottom of the frame, but the Astros pulled ahead for good with a four-run sixth inning en route to their first win in more than a week.

Dominguez was made fun of by teammates before the game for having three servings of soft-serve ice cream.

“I had some during the game too,” he said afterward.

Nos. 5-7 hitters Marc Krauss, Alex Presley and Dominguez were the driving force, finishing with a combined seven hits and six RBIs.

The ‘Stros (6-14) entered Monday with a seven-game losing streak, while the Mariners were on a six-game skid. The meeting of scorching-hot teams prompted Astros owner Jim Crane to say before the game, “Somebody’s going to win tonight.”

“That was arguably our best game that we played all year as far as complete baseball,” manager Bo Porter said, “from pitching to defense to timely hitting. Even a lot of the outs that were made were really quality at-bats.”

Lefty Dallas Keuchel, the Astros’ No. 5 starting pitcher only in title, turned in yet another strong start — with a very impressive 17 swings and misses. The ground-ball specialist, who didn’t realize until roughly 24 hours beforehand the pitcher he’d be opposing Monday would be Hernandez, weathered a chilly night for six innings at Safeco Field.

Astros relievers Chad Qualls, Matt Albers and Josh Fields combined for three innings of one-hit, shutout ball with six strikeouts.

Keuchel struck out a season-high eight — one off his career-high — and held the Mariners to one walk and six hits in his six innings.

A game-tying, two-run double from Abraham Almonte was the only damage Keuchel allowed. That came in the fifth inning, a frame that could have been worse had Keuchel not recorded all three outs by strikeout.

“I have some above average off-speed (stuff), and when I can throw my fastball strikes with movement, it just kind of sets up that off-speed,” Keuchel said. “Anytime I can get ahead and make those guys think about the fastball, it just makes that offspeed so much better.”

Astros hitting coach John Mallee said just a day earlier that Matt Dominguez was not one of his hitters to be worried about.

“He’s just getting out in front a little bit,” Mallee said. “He’s putting the ball in play a lot. He’s not striking out a lot. He’s just mis-hitting some balls, where, when he’s going good, he doesn’t miss. So he’s one of ‘em that I think is going to get rolling here.”