PITTSBURGH -- Jeff Locke didn't have his best stuff Sunday. He didn't need it to shut down the majors' worst team.
Locke (4-1) won his fourth straight decision and gave up one run or fewer for the fifth time in his past eight outings. He struck out four and walked three.
"Pitched' is the imperative word," Pirates manager Clint Hurdle said of Locke. "He was behind a number of counts, his first-pitch strikes were below 50 percent... but, that being said, he didn't give up anything. He was able to put a foot down, get balls on the ground when we needed them."
In his past six outings, Locke has allowed 21 hits and seven earned runs over 37 innings (1.70 ERA). Despite allowing the leadoff man to reach four times, Locke permitted a runner to reach second base only once.
"There were some pitches early on that were real good pitches that I felt I had real good command of, but there were times in the game that I fell behind 1-0, 2-0 and put them in some pretty good hitter's counts," Locke said. "But I was able to make pitches and use the defense."
The notoriously streaky Alvarez pushed his average above .200 for just the second time since the second game of the season. His eighth home run came on the first pitch and was an opposite field line drive down the left field line in the fifth.
Alvarez's most recent homer was Friday -- a titanic shot that reached the Allegheny River. Hurdle quipped that his third baseman followed up arguably his longest career home run with perhaps his shortest.
"I just remember hitting it and knowing that it was going to be fair," said Alvarez, who also walked in the second and flied out to the wall in center in the seventh. "But I didn't know if it was going to carry as much as it did."
Alvarez's longball -- his third in eight games -- was the lone mistake by Astros starter Lucas Harrell, who lost his third consecutive decision despite allowing four hits and one walk in seven innings.
Through 6 1/3 innings, Alvarez's home run and Snider's double were the only balls to leave the infield off Harrell (3-5), who had a single in a rare plate appearance for an American League pitcher.
"Today felt like the first game this season that I dominated both sides of the plate with my sinker," Harrell said. "(Catcher Carlos Corporan) did a great job with his homework. He had a really good game plan and I just followed along."
Snider, who had doubled, and Snider's shoulder to the chest of Corporan did not jar the ball loose.
Off to their best 44-game start since 1991, the Pirates (26-18) have the National League's third-best record. They won despite the absence of outfielder Andrew McCutchen, who was a late scratch because of soreness in his right knee.
McCutchen said he was put at ease after an examination by medical personnel Sunday and that he expects to play in the Pirates' next game Tuesday. Hurdle said he could have used McCutchen in an emergency.
The Astros, who won in 11 innings Saturday night, did not have an extra-base hit.
"Their guy (Locke) did a good job," Houston manager Bo Porter said. "He changed speeds, pitched to both sides of the plate and kept us away from the barrel. Sometimes you've got to tip your cap and give credit to the other guy."
Astros SS Ronny Cedeno was scratched from the lineup late Sunday morning because of a sinus infection. ... Houston has won three of its 11 series played this season while Pittsburgh is 8-2-2 in its past 12 series. ... The Pirates are off Monday but then play on 16 consecutive days. They open up a three-game series against the Chicago Cubs at PNC Park on Tuesday. ... Astros LHP Dallas Keuchel will make his third start of the season in the opener of a three-game series in Kansas City on Monday.