Aaron Harang has shown a knack in his brief Mariners career for following his worst outings with some of his best, but he out-did himself on Tuesday.

Coming off a start in which he didn’t even make it out of the third inning against the Yankees, Harang was masterful in a 4-0 victory over the Houston Astros at Safeco Field. With Team USA playing soccer simultaneously at Century Link Field, the game drew just 10,266 fans, the second-smallest crowd ever at Safeco.

They saw Harang fire his second shutout in his last four starts and eighth of his career, a two-hitter that matched the best outing of his career. He also had a two-hitter against the Pirates on Aug. 29, 2007 while pitching for Cincinnati. Harang struck out a season-high 10, his first game of double-digit strikeouts since April 13, 2012 while with the Dodgers. Harang didn’t walk a batter.

“He was fantastic,’’ Mariners manager Eric Wedge said. “When he commands his fastball and it rides like it was tonight and he’s able to leverage it downhill, and climb when he wants to, he’s real good. When he does that, his secondary stuff is locked in, too, and that’s how it was tonight.”

The key for Harang, now 3-6 with a 5.60 earned-run average, is to do that more consistently. He’s tied for the major-league lead in shutouts but has also mixed in some stinkers along the way.

“It’s muscle memory, that repetition of working right,’’ he said. “They say it takes a certain percentage of doing something bad or wrong to throw everything off, and it takes four times as long to get it back to being right.

“It also comes with feel. Some days you feel great, and you can throw every pitch in any count. Other days you pray you can throw just one pitch for strikes. When you can throw more than one pitch for strikes and get ahead early, it makes all the difference in the world.”

The Astros, meanwhile, continued the sloppy play that had marked their loss to the Mariners on Monday. Endy Chavez led off Seattle’s first with a double into the right-field corner, and when the throw in skipped past shortstop Ronny Cedeno for an error, Chavez moved to third.