Gerrit Cole of the New York Yankees pitches during the first...

Gerrit Cole of the New York Yankees pitches during the first inning against the Philadelphia Phillies at Yankee Stadium on Wednesday. Credit: Jim McIsaac

The Yankees finished their first homestand of the season — one played against two National League teams — with a pair of series wins after Wednesday’s 4-2 victory over the Phillies before 35,847 at Yankee Stadium.

Gerrit Cole was charged with one run in 6 1/3 innings, scorching-hot Gleyber Torres drove in two runs with a pair of singles and Jose Trevino added a two-run home run.

Cole (2-0, 0.73 ERA) allowed three hits, walked three and struck out eight in a 103-pitch effort. The Yankees (4-2) took two of three in the series against the defending NL champion Phillies (1-5).

“Just played some good baseball,” Cole said. “Some tight games. So far, I think we’ve played every pitch and we’ve taken care of the details really well. We’re in a spot to keep laying the foundation from here.”

Yankees third baseman Josh Donaldson left the game in the third inning with a tight right hamstring he felt running to first base on a fly ball to center in the second. The Yankees said Donaldson would be re-evaluated on Thursday, when they have an unplanned day off.

On Wednesday afternoon, the Baltimore Orioles announced that their home opener against the Yankees scheduled for Thursday afternoon was being postponed until Friday at 3 p.m. because of a forecast of severe weather. Friday was supposed to be an off day.

Cole, who threw six innings in the Yankees’ Opening Day shutout victory vs. San Francisco, pitched scoreless ball for 6 1/3 innings on Wednesday.

It was his last pitch — or what would have been his last pitch — that was a little strange.

With one out in the seventh, Cole had a 3-and-2 count on Nick Castellanos when the righthander and Trevino could not get together on a sign within the 15 seconds allotted under MLB’s new speedup rules. Plate umpire Nic Lentz called a pitch-clock violation ball four for the walk and Castellanos was awarded first base.

Cole yelled in frustration before being removed by manager Aaron Boone.

Both Trevino and Cole said all they had to do to avoid the penalty was to call time out.

“We’ve just got to call a mound visit,” Cole said. “It’s a bit unfortunate. It was my first one. Pretty poorly timed. But we’ll learn from it.”

Jonathan Loaisiga came on and gave up a single to Bryson Stott and then hit Alec Bohm in the back to load the bases. Jake Cave skied a sacrifice fly to left to make it 2-1, with the run charged to Cole.

Pinch hitter Josh Harrison sent a grounder down the third-base line. Isiah Kiner-Falefa, who replaced Donaldson, fielded the ball and beat Stott to the bag by a step to end the inning.

The Yankees had taken a 2-0 lead on RBI singles by Torres off Aaron Nola (0-1, 7.45) in the first and sixth innings.

After going 3-for-4 with a double and two stolen bases in three attempts, Torres is batting .421 with a 1.349 OPS.

“That’s what he’s capable of,” Boone said of Torres, who hit cleanup as the designated hitter as Giancarlo Stanton got the day off. “We’re seeing a guy that’s really starting to enter the prime of his career. He’s a young man (26). I feel like every at-bat has been super competitive.”

Torres has reached base in 14 of 25 plate appearances and has stolen five bases in six attempts. Last year, Torres had 10 stolen bases in 15 attempts.

Trevino’s first home run of the season, a short-porch special to left off lefthander Gregory Soto in the seventh, gave the Yankees a 4-1 advantage.

Kyle Schwarber hit a solo homer off Loaisiga in the eighth. Clay Holmes struck out the side in a 1-2-3 ninth for his first save in a game that took 2:30.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME