Updated

This one looked nothing like Jordan Lyles' major league debut.

Houston's promising rookie right-hander followed up his brilliant debut with a frustrating effort that had him out of Sunday's game at San Diego after just four innings.

The Padres took advantage of the young pitcher's mistakes and beat the Astros 7-2, winning the final three games of the four-game series.

Lyles (0-1), the youngest player in the majors at 20, was coming off an excellent outing at Wrigley Field on Tuesday when he carried a shutout into the eighth inning. Lyles eventually got pulled and allowed two runs on five hits in seven-plus innings. He avoided the loss when the Astros rallied to win.

But against San Diego, he was in trouble immediately as he allowed three first-inning runs.

"I left a lot of balls running back over the plate," Lyles said. "This is the major leagues. They're going to make you pay for it most of the time and they did."

Lyles gave up four runs and five hits in four innings. He struck out three, walked one and hit two batters with pitches.

"It appeared to me he was having trouble getting his fastball down in the zone," Houston manager Brad Mills said. "He couldn't get command of it or feel his breaking ball. He was getting behind the hitters."

With his team trailing 4-1 when it was Lyles' turn to bat leading off the fifth, Mills pulled his rookie pitcher, who had already thrown 96 pitches.

"Nothing felt really good coming out," Lyles said. "It was a little bit different from that first outing. They made me pay for my mistakes."

By taking three in a row from the Astros after dropping the series opener Thursday night, San Diego won just its second home series this season. It was also the first time this season the Padres won three consecutive home games.

Despite the three straight wins, San Diego still has the NL's worst home record at 12-21.

San Diego scored three first-inning runs to give Mat Latos (4-6) an early lead. Latos labored through five innings to win his third straight start, allowing two runs on six hits with three strikeouts and two walks.

The resurgent Padres won for the eighth time in 11 games. San Diego remains in last place in the NL West.

Houston's Hunter Pence extended his hitting streak to a career-high 17 games with an RBI single in the fifth. Pence's hitting streak is the second-longest current run in the majors. St. Louis infielder Ryan Theriot has hit safely in 19 consecutive games.

After winning the first four games on its road trip, Houston wound up 4-3 for its first winning trip this season.

Alberto Gonzalez had a two-run single for the Padres in the seventh inning, Jason Bartlett had three hits and scored twice, and Ryan Ludwick walked twice, was hit by a pitch and scored two runs.

San Diego, which has been outscored 36-20 in the first inning, turned around that trend against Lyles.

Chris Denorfia led off with a single and scored on Bartlett's triple. With one out, Lyles hit Ludwick with a pitch and Brad Hawpe followed with an RBI single. Aaron Cunningham bounced into a force play to bring in the third run.

After Latos allowed Michael Bourn's leadoff walk in the third and a stolen base, Carlos Lee followed with a two-out RBI single.

Chase Headley extended his hitting streak with an RBI double to the wall in right-center in the third to score Bartlett, who led off with an infield single, for a 4-1 lead. Headley finished with two doubles.

Houston got a run back in the fifth on Pence's run-scoring single with one out after consecutive singles by pinch-hitter Angel Sanchez and Bourn.

The Astros, who entered second in the NL in batting average with runners in scoring position, went 5 for 41 (.122) in the series. Houston stranded nine runners on Sunday.

NOTES: San Diego won two of three games against Arizona from May 6-8 for its only other winning series at home. ... Pence's hitting streak is the Astros' longest since Miguel Tejada hit in 21 straight games in 2009. ... Houston RHP Brandon Lyon began a rehab assignment with Triple-A Oklahoma City. Lyon has been on the 15-day DL with right biceps tendinitis and a partial right rotator cuff tear.