HOUSTON (AP) — Alex Bregman hit an early three-run homer, Framber Valdez pitched seven strong innings and the Houston Astros edged the New York Yankees 3-2 Thursday night to take a 2-0 lead in the AL Championship Series.

Yankees slugger Aaron Judge just missed a two-run homer in the eighth when his drive was caught just in front of the short wall by right fielder Kyle Tucker. The ball would’ve landed in the short right-field porch at Yankee Stadium, Statcast showed — with the roof open at Minute Maid Park, the wind might’ve knocked down Judge’s bid.

A night after Justin Verlander fanned 11 in a 4-2 win in Game 1 of the best-of-seven series, Valdez turned in another solid pitching performance and Bregman’s third-inning homer was all the offense Houston needed. The Astros improved to 5-0 this postseason.

Valdez allowed just four hits, walked none and struck out nine. The only runs New York mustered were unearned, coming in the fourth after a flustered Valdez committed two errors on the same play.

But he quickly moved past the gaffe and shut down the powerful Yankees lineup the rest of the way. Valdez allowed just one baserunner after that inning on a single to Harrison Bader with two outs in the fifth and retired the last seven hitters he faced, capped by striking out the side in the seventh.

Featuring a mix of pitches, Valdez got 25 swings and misses. He also helped end the Yankees’ record run of 23 straight postseason games with a home run.

Bryan Abreu pitched a scoreless eighth. Ryan Pressly walked one in a scoreless ninth, striking out three for his second save of the series.

There was a slight delay before Pressly threw his first pitch after a fan got on the field and appeared to try and hug Astros second baseman Jose Altuve and take a selfie with him. Security and police officers quickly descended on the man and pulled him away from Altuve before wrestling him to the ground, handcuffing him and escorting him off the field.

The series shifts to New York for Game 3 Saturday where the Yankees will try to dig themselves out of a hole to avoid being eliminated by Houston in the ALCS for the third time in six years.

Houston is 7-2 overall against the Yankees this year.

Yankees starter Luis Severino plunked Martín Maldonado on the left forearm to start Houston’s third before the slumping Altuve struck out. Jeremy Peña singled to center before Yordan Alvarez grounded into a forceout at second.

Bregman then knocked a fastball beyond the wall in left field for his second home run this postseason to make it 3-0. It was his 14th career home run in the playoffs to move him past Justin Turner for most homers by a third baseman in MLB history.

It was a bit windy at Minute Maid Park in a rare game where the retractable roof was open, and it was unclear how much the conditions impacted flyballs. Judge, who set an AL record with 62 home runs during the regular season, gave the Houston fans with his drive that Tucker grabbed before knocking into the wall.

The Astros are unbeaten this postseason after sweeping the AL Division Series against Seattle. They’ve done it without any help on offense from Altuve, long a postseason powerhouse.

The three-time batting champion went 0 for 4 Thursday to fall to 0 for 23 in the playoffs this year, which is the longest hitless streak to begin a postseason in MLB history. He passed Dal Maxvill, who went 0 for 22 in the 1968 World Series for the Cardinals.

Judge got his first hit of the series with a single to get things going for the Yankees in the fourth.

Then came a nightmare of a play for Valdez where he made both a fielding and a throwing error. Giancarlo Stanton hit a chopper toward Valdez, and he grabbed it, possibly with time to start a double play, but then dropped it.

Valdez picked up the ball but fell backwards to the ground as he threw to first. His toss was offline, allowing Judge to advance to third and Stanton to reach second on the play.

Valdez remained on his back on the grass for a few seconds after seeing the ball roll past first base and put a hand to his face and shook his head before gathering himself and returning to the mound.

Anthony Rizzo followed with a groundout that scored Judge to make it 3-1.

A single by Gleyber Torres sent Stanton home to get the Yankees within 3-2. But Valdez struck out Josh Donaldson and Kyle Higashioka to limit the damage.

Severino was lifted after allowing a single to Tucker with no outs in the sixth. Jonathan Loáisiga took over and was greeted with a single by Yuli Gurriel. But Aledmys Díaz grounded into a double play to end the inning.

Severino allowed five hits and three runs with six strikeouts in 5 1/3 innings.

PETTIS OUT

Astros third base coach Gary Pettis was out for a second straight game because of an illness. First base coach Omar Lopez filled in for Pettis, and quality control coach Dan Firova coached first.

UP NEXT

Gerrit Cole (2-0, 2.03 ERA), who helped the Astros to the 2019 World Series before signing with the Yankees, will start for New York in Game 3 Friday. Houston has yet to name its starter, but it will likely be Lance McCullers.