HOUSTON (AP) -- J.D. Martinez hit a two-run homer off James Shields, Jordan Lyles pitched six effective innings and the Houston Astros beat the Kansas City Royals 3-1 on Wednesday night.
Lyles (2-1) allowed one run and six hits in his 50th career game. Travis Blackley and Hector Ambriz each got three outs before Jose Veras pitched a perfect ninth for his eighth save one night after the bullpen struggled in a 7-3 loss.
Houston took two of three from Kansas City for its fourth series win this season.
Shields (2-5) struck out seven in seven innings while yielding two runs and seven hits. He has gone seven or more innings in each of his last six starts, but hasn't won since April 30 due in part to his offense providing him with just five runs combined in his last four starts.
The right-hander, who was acquired in an offseason trade with Tampa Bay, retired his first two batters before running into trouble. Jason Castro singled before Martinez drove a 2-2 pitch into the seats in right for his fourth homer.
Castro tacked on an RBI single in the eighth inning against Kelvin Herrera.
Houston's Jimmy Paredes got his first start of the season at third base in place of Matt Dominguez, who sat out with tightness in his left quadriceps. Paredes has struggled in the outfield in the last few games, causing two collisions, but was solid at third.
Alcides Escobar smoked a grounder to Paredes with one out in the eighth, and he made a perfect throw to first to get him out.
Kansas City got its only run in the third when Jeff Francoeur hit a leadoff triple to the hill in center and George Kottaras followed with an RBI double. Alex Gordon walked with two down, but Lyles struck out Billy Butler to end the inning.
Lyles also got Gordon to bounce out with two runners on to end the fifth.
After their two-run first inning, the Astros had trouble stringing together hits against Shields. Martinez singled to start the fourth, but was thrown out trying to stretch it into a double. Chris Carter followed with a single but Shields retired the next two batters to end the inning.
Gordon singled in the first inning to extend his hitting streak to 10 games.
NOTES: Houston is off on Thursday. ... The Royals return home to open a four-game series with the Angels. ... Kansas City C Salvador Perez was out of the lineup for the second straight game after bruising his right hip after crashing into the railing chasing a foul ball on Monday. He said he has a gigantic bruise on his hip, but is OK and that he could have played on Tuesday. He is day to day. ... Dominguez is expected to be back in the lineup on Friday.