After watching his team collect just five hits and one run against a journeyman starter who hadn't won a big league game in more than four years, Pittsburgh Pirates manager Clint Hurdle threw up his hands.

"We're in that little rut where it looks like we're hitting in a tea cup," Hurdle said.

Or maybe a thimble.

The Pirates lost their fourth straight on Monday, a 5-1 defeat to the lowly Houston Astros that dropped Pittsburgh 2½ games behind St. Louis in the pursuit of the NL's second wild card spot.

"We were not able to connect on any at-bats today," Hurdle said. "I didn't see a lot of pitches taken. There's nothing you can do from the dugout to help that out. That's ownership in the batter's box."

Garrett Jones had three hits for the Pirates, who have dropped 10 of 13 and failed to get a needed spark at the start of pivotal six-game homestand against the two worst teams in baseball.

"We've got to keep going," Jones said. "We've got to keep our heads high, keep our confidence high and get'em tomorrow."

They certainly couldn't get'em against Houston starter Edgar Gonzalez (1-0). The 29-year-old was pitching in the Mexican League earlier this summer. He returned to the majors with a solid 5 1-3 innings then relied on some help from the bullpen to earn his first victory as a starter since April 24, 2008 when he was pitching in Arizona.

"This is the best thing that's happened to me this year to make the comeback to the big leagues and I feel great," Gonzalez said. "I appreciate the Astros giving me the chance to throw in the big leagues and I'm going to work hard every day to stay here."

Brett Wallace had three hits, including a three-run homer, for Houston, which won for just the third time since interim manager Tony DeFrancesco took over two weeks ago.

"Since I've been here, the fight's been there every game," DeFrancesco said. "I have no problem with the way guys are competing ... They're starting to have fun, getting on each other and in the dugout. There's a lot of life."

Something the Pirates were hoping to get from spot starter Jeff Locke, but the left-hander ran into trouble early and left a hanging curveball that Wallace mashed into the seats in right-center in the fifth that seemed to deflate the Pirates. Locke surrendered five runs in five innings to remain winless in five big league starts.

"Everything felt really good," Locker said. "The one pitch to Wallace got away and he took advantage of it."

The Astros, long relegated to the role of spoiler, jumped on Locke quickly. Locke was pressed into service after the team released veteran left-hander Erik Bedard last week.

Locke pitched well at Triple-A Indianapolis this season, going 10-5 with a 2.48 ERA but found the going a little more difficult in his first start in the majors this season.

Houston needed just four pitches to load the bases in the first, though Locke managed to escape giving up just one run. The Astros pushed it to 2-0 in the third on an RBI groundout by Justin Maxwell before Locke came unraveled in the fifth.

Jose Altuve singled with one out and Tyler Greene followed with a chopper to Pittsburgh shortstop Clint Barmes, who double-clutched on his throw to first to give Greene just enough time to beat it out for a hit. One pitch later the Astros were up 5-0.

"There was a play to be made (on Greene's grounder)," Hurdle said. "It would have been tough though."

The blast gave the well-traveled Gonzalez all the breathing room he would need while giving the Astros a boost.

"He looks like he had a plan today to be the No. 1 guy," DeFrancesco said. "He went out and gave us innings. He threw strikes early in the count. He got ahead. He had good put-away pitches. We've liked what we've seen and it could be a real nice addition to our rotation."

Pittsburgh is enjoying its best season in two decades, but the Pirates' momentum took a hit over the weekend while getting swept in Milwaukee. Things didn't get better against the Astros, who are making their final appearance at PNC Park before switching to the American League next year.

NOTES: Pittsburgh 2B Neil Walker (back) began baseball activities and could return to the team by Friday. Walker hasn't played since Aug. 26 ... Karstens has been cleared to do "flat ground" work but there remains no timetable for his return. Karstens left Friday's loss in Milwaukee in the first inning with what's been diagnosed as a hip flexor strain ... The series continues on Tuesday when Pittsburgh's Wandy Rodriguez (9-13, 3.86 ERA) faces Houston's Jordan Lyles (3-10, 5.46) ... The Astros are 3-10 under DeFrancesco ... Houston recalled C Carlos Corporan, RHP Chuckie Fick, LHP Dallas Keuchel and OF J.D. Martinez after the game.