PITTSBURGH -- Jeff Locke finally regained his All-Star form Thursday night.
The left-handed Locke allowed only one run and three hits in seven innings to pitch the Pittsburgh Pirates to a 3-1 victory over the Chicago Cubs at PNC Park in the opener of a three-game series.
Locke (10-5) won for the first time July 21 in helping the Pirates keep pace in a tight National League Central race. The Pirates entered the day one game behind the St. Louis Cardinals, who hosted the Milwaukee Brewers on Thursday night.
Locke went 8-2 in the first half of the season and was selected to the All-Star Game. However, he had gone 0-3 with a 6.57 ERA in his last eight starts prior to Thursday.
"All I wanted to do was get back to the pitching shape I was in before, so the team could look at me to go out and win a game for them," Locke said. "The one thing that hasn't gone away is my confidence and it's because the guys in this clubhouse wouldn't let it. I've gotten a lot of pats on the back and guys telling me not to change a thing.
"That's why I'm so happy to go out and give these guys a game like I did in the first half because all these games are important from here on out and we need to win as many as we can."
Locke had five strikeouts and issued only one walk -- he leads the NL with 79 bases on balls and had walked 27 in 38 1/3 innings during his winless streak.
Opponents were hitting .324 off Locke since the All-Star break before Thursday's game. He allowed just a .202 average in the first half.
"Jeff was being aggressive, following the glove and staying in a good rhythm tonight," Pirates manager Clint Hurdle said. "It was intent, conviction and execution. All three of them were covered."
The Pirates ran their winning streak to four games as they opened their final homestand, an 11-gamer against the Cubs, San Diego and Cincinnati that is their longest of the season. Pittsburgh is 46-25 at home.
Jordy Mercer had two of the Pirates' six hits, including an RBI double in the eighth inning that pushed their lead to 3-1. Andrew McCutchen extended his hitting streak to 10 games when he doubled and scored during a two-run fourth.
The Pirates' magic number for clinching their first postseason berth since 1992 is down to nine but Mercer said Pittsburgh isn't looking that far into the future.
"We're not going to put any pressure on ourselves," he said. "We're playing good enough ball that we can play with anybody, but we've taken it one day at a time all year long and there is no reason to change that approach."
Mark Melancon survived a ninth-inning threat for his 14th save in 17 opportunities. The Cubs put the first two men on as Darwin Barney reached on a strikeout/wild pitch and Anthony Rizzo singled to snap a 0-for-17 skid. But Melancon bounced back to retire the next three batters.
The Cubs are hitting just .173 in 13 games against Pittsburgh this season while going 5-8.
Chris Rusin (2-4) again had nothing to show for a fine outing as he took the loss despite giving up just two runs and four hits in seven innings with no walks and two strikeouts.
The lefty is winless in six starts since Aug. 9, going 0-3 with a fine 2.67 ERA. He has allowed two earned runs or less in seven consecutive starts and nine of 11 since being called up from Triple-A Iowa.
"He did a great job against a lineup that kills left-handers, so that to me is the most impressive thing about the outing," Chicago manager Dale Sveum said. "He did a great job again. He's been right there with (left-hander Travis Wood) as our most effective starter. Ever since he's got into the rotation, he's done pretty much a great job every outing."
Pittsburgh took a 2-1 lead on back-to-back RBI singles by Marlon Byrd and Pedro Alvarez with two outs in the fourth.
"Bottom line is not letting Byrd and McCutchen do serious damage but they ended up being part of two of the runs," Sveum said.
Chicago broke on top with a run in the third inning. Darnell McDonald led off with a ground-rule double that bounced over the 410-foot sign in left-center field, and he scored on Starlin Castro's two-out single.
NOTES: Pittsburgh RHP Charlie Morton (7-4, 3.44 ERA) will start Friday night against Chicago RHP Jake Arrieta (2-2, 4.28) in the second game of the four-game series. There was some question about Morton's availability after he left his start last Sunday in the second inning at St. Louis because of a flare up of plantar fasciitis in his left foot. ... Pirates LHP Wandy Rodriguez, who has been on the disabled list since June 6 with tightness in his left forearm, threw 67 pitches Thursday in a five-inning simulated game. ... Pittsburgh OF Starling Marte was one of the hitters who batted against Rodriguez, the first time he has faced live pitching since being placed on the disabled list Aug. 19 with a bruised right hand. Marte was activated Sept. 7 but has been limited to pinch-running and late-inning defensive replacement duty. ... Cubs rookie LF Junior Lake extended his hitting streak to nine games with a single in the fourth inning.