Early runs spelled success for the Rangers on Wednesday as Jon Gray pitched well enough to win his third outing of the season, leading Texas to a 2-0 sweep of the Phillies.

The Rangers’ runs started in the second inning.

Jonah Heim earned a lead-off walk, and Nathaniel Lowe reached on an error, giving Texas runners at first and second. Josh H. Smith successfully sacrifice-bunted the runners up a bag each ahead of Ezequiel Duran striking out. With two outs and the runners in scoring position, Brad Miller singled to left to plate Heim and Smith for a 2-0 Texas lead.

However, the Phillies answered the bell in the top of the third when Kyle Schwarber swatted his 19th homer of the season off of Gray to knot the contest at 2-2.

Corey Seager got the Rangers rolling again during the bottom of the third with a lead-off double, his ninth of the year, on a sharp line drive to right field. Adolis Garcia grounded out to move Seager to third, then Kole Calhoun followed up with a single to score Seager and regain the lead, 3-2, for Texas.

Texas added an insurance run in the bottom of the fifth, following back-to-back doubles by Garcia and Calhoun to push the lead to 4-2.

From there, Texas relied on its pitching staff.

Gray pitched into the sixth inning, and aside from the Schwarber homer, he allowed three other hits in 5.2 innings, giving up four hits total, two runs with a walk, and five strikeouts.

“He was really good today,” Rangers skipper Chris Woodward told MLB.com. “Schwarber is as hot as can be. Gray actually didn’t make a terrible pitch; he just left it a little over the plate. Outside of that, you saw the funky swings on some pretty good hitters on their side.”

Matt Moore pitched 1.1 scoreless innings in Gray’s relief, earning his third hold of the season; Dennis Santana tossed another scoreless inning in the eighth for his 12th hold of the season, and Joe Barlow earned save No.12 on the season after a spotless ninth.

“Martín doing his job yesterday, and Jon obviously did a great job getting into the sixth inning,” Woodward said. “The bullpen guys came in and wiped people out. Moore and Santana have been doing that for a while now.”

The Rangers’ victory gives the ballclub a 33-35 record as they continue to flirt with a .500 record. Texas sits in second place in the AL West, 10 games behind first-place Houston and a game ahead of the Angels.

The team will have a day off on Thursday before game one of a three-game set against the visiting Washington Nationals. Probable starters for the TGIF-tilt are Paolo Espino (0-1, 2.29) for the Nats and Dane Dunning (1-5, 4.38) for the Rangers.