Pittsburgh, PA (Sports Network) - Marlon Byrd and Pedro Alvarez each plated a run and Jeff Locke returned to form on the mound as the Pittsburgh Pirates nabbed a 3-1 victory from the Chicago Cubs to begin an 11-game homestand.

Locke (10-5) had been winless in his last nine starts, but on Thursday, he resembled the pitcher that earned him All-Star recognition for his first half efforts. He went seven innings, allowing one run on three hits with just one walk. He retired the last 10 batters he faced.

"Tonight was an example of everything working out the way you'd like it to," Locke said.

Mark Melancon had runners on first and second in the ninth, but retired three in a row to notch his 14th save and secure Pittsburgh's fourth straight win. The team moved into a first place tie atop the NL Central with St. Louis, which fell to Milwaukee on Thursday.

Chris Rusin (2-4) was a tough luck loser, scattering two runs on four hits over seven frames. Starlin Castro drove in the lone run for the Cubs, who have dropped three of their last five games.

"Ever since he's got into the rotation, he's done pretty much a great job every outing," Cubs manager Dale Sveum said of Rusin.

The Cubs took the first lead after receiving a ground-rule double from Darnell McDonald to open the third inning. He later came around to score when Castro sprayed a two-out single to left for a 1-0 advantage.

Justin Morneau made an over-the-shoulder catch for the Pirates the following inning to keep it a one-run game. With two out and two on, the first baseman retreated and snagged a shallow pop up off the bat of McDonald.

The Pirates then surged ahead in the bottom of the fourth. Jordy Mercer recorded the team's first hit with one out, but was later erased at home on a fielder's choice. However, it left runners at the corners and Byrd and Alvarez produced back-to-back RBI singles for a 2-1 lead.

Neither team recorded a hit between the fifth and seventh innings, but the Pirates were able to tack on a run in the eighth on a double from Mercer. Clint Barmes had singled in front of Mercer's run-scoring hit.

Darwin Barney struck out to begin the top of the ninth, but reached on Melancon's wild pitch. Anthony Rizzo then singled, but the Cubs went hitless from there.

Donnie Murphy popped up on a bunt, Junior Lake flew out and Welington Castillo grounded into a force out to end the game.

Game Notes

Locke notched his first win since July 21. He was 0-6 over his winless stretch ... The Cubs had just four hits and went 1-for-7 with runners in scoring position.