Eddie Rosario wasn’t even added to the Twins roster until an hour before first pitch Sunday. Seems like everything about Rosario took a little longer than usual.

The outfielder, recalled from Class AAA Rochester in case a roster move was necessary, grounded into what appeared to be an inning-ending, rally-killing double play in the fifth inning. But the Twins challenged the call at first base, and replay showed Rosario’s foot made contact with the base a split-second before the baseball arrived, a judgment that enabled what turned out to be the decisive run to score in the Twins’ 5-4 victory over Texas at Target Field.

“Rosie had a good day, coming up here and having to face [Cole] Hamels,” Twins manager Paul Molitor said of the rejuvenated outfielder. “He got out front [of a pitch] with the bases loaded but beat the play. That was a big run for us.”

It was, because on a day full of wrestling with the roster and the lineup, it allowed the Twins to do something that no American League team had done this year: beat Hamels. The lefthander, 9-1 on the season and unbeaten since losing to the Pirates on May 27, hardly looked like an All-Star on Sunday. Hamels put a runner on base in all five innings he appeared, allowed a season-high 10 hits, and was saved only by some unfortunate baserunning on the Twins’ part from giving up more than five runs.

Turns out, a scouting report was a big part of the reason. Just as they did against Cy Young winner Dallas Keuchel, the Twins emphasized to each other that those pitchers succeed because of pitches out of the strike zone, not in it. “He throws a lot of pitches out of the zone that people chase,” Brian Dozier said. “Hamels, he lives off his cutter … but he wasn’t really commanding it.”

Dozier noticed the first time up, when he struck out on “two nasty changeups that I had no chance at,” he said. So during his second at-bat, with two runners on and two outs, he knew that “smart pitchers come right back at your weakness and try to exploit it. [He went] changeup, changeup — ball, ball — and then fastball to the middle of the plate. Against good pitchers, you’ve really got to capitalize on mistakes.”

Dozier did, tripling home two runs on a blast that missed the planters in right-center by about 3 feet to put the Twins in front. Robbie Grossman then singled him home.

In the fourth, the Twins managed three hits and a stolen base, but they failed to score because two runners were thrown out at the plate.

“I got a little concerned when we ran ourselves out of that inning,” Molitor said. Kurt Suzuki, who had singled, tried to score from first base on Rosario’s double but was tagged out as he tried to lunge around catcher Bobby Wilson’s glove. Moments later, Rosario was tagged out too, when he tried to score on Danny Santana’s hard grounder to shortstop Jurickson Profar.

But the Twins simply mounted another rally in the fifth inning, knocking Hamels out after back-to-back walks to Miguel Sano and Dozier, and back-to-back singles by Grossman and Max Kepler. Rosario’s not-quite-a-DP brought home the fifth, and ultimately critical, run.