If Gio Urshela were to retire Wednesday, he would at least be able to say he had a hit off "one of the best to ever do it," as Twins starter Joe Ryan deemed his Houston counterpart Tuesday night.

Justin Verlander, the 39-year-old with two American League Cy Young Awards, nearly pitched his fourth no-hitter, holding the Twins hitless at Target Field until Urshela's eighth-inning line drive to right field dashed the bid. The Astros (19-11) went on to win 5-0 in front of an announced 16,156 fans, ending a nine-game home winning streak for the Twins (18-12).

Urshela had faced Verlander only five times before Tuesday and had managed to draw two walks along with one strikeout. He grounded out in his prior two at-bats Tuesday, including hitting into a double play. And considering another Verlander no-hitter would rank him alongside Sandy Koufax and Nolan Ryan as pitchers with four or more in their career, Urshela felt pretty good about his consolation hit.

As it was, the Twins narrowly avoided what would have been their 10th time being no-hit, the first since May 2, 2012, against Anaheim's Jered Weaver.

"Very consistent with the stuff he's got," Urshela said of Verlander. "He's a veteran guy, so he knows how to pitch and he knows every hitter. He knows how to handle those situations."

Verlander left after the eighth inning, allowing just the one hit and two walks while striking out five. The Twins had more success against Blake Taylor in the ninth with two hits but still couldn't avoid the shutout.

If there was a positive to take from such an outing, acting manager Jayce Tingler found it.

"It's a good productive night, especially for some of the young guys like Royce [Lewis] and [Jose] Miranda, to be able to see that," Tingler said, adding Gilberto Celestino to that list as well. "There's not a lot of guys that can locate, mix all the pitches. Verlander's fastball, it's got a ton of carry. That's why you see a lot of either pop ups or pitches fouled straight back, and then what he's able to do with the slider and the curveball. And then he can throw it where he wants."

Ryan rued not being able to keep up with the Houston veteran. The Twins starter kept just missing the strike zone, giving up a career-high five walks. He also felt like he never quite had control of his slider, chalking the loss up to poor execution as he is now 3-2.

Houston rookie Jeremy Pena — Carlos Correa's heir at shortstop for the Astros — drove in the first two runs off Ryan in the second and fourth innings. Ryan gave up one more run off Alex Bregman's RBI double in the fifth before leaving the mound.

"I just wish I had pitched a little better and made it a little more exciting," Ryan said. "I think a duel there would have been fun. But kind of a one-sided outing."

Danny Coulombe took Ryan's place with runners in scoring position, and Yordan Alvarez followed with a sacrifice fly. But Coulombe didn't pitch for as long as anticipated, leaving with left hip inflammation while facing his second batter in the sixth. It was yet another blow to the injury-riddled Twins, from Correa's bruised finger to Byron Buxton's tight hip to Chris Paddack's elbow woes, to name a few.

But this is where Tingler's second bright spot emerged, as Jharel Cotton — just brought up Tuesday amid all the injuries — entered the game and threw 3 2/3 innings and had just Bregman's sacrifice fly occur on his watch. He even stayed in the game for a couple more hitters after taking a comebacker off his leg.

"I thought Cotton kind of saved our bacon," Tingler said. "… Not a lot of highlights when you lose 5-0, but I thought what Cotton did for the team, certainly the staff, I thought that was huge."