Updated

The Chicago Cubs and Milwaukee Brewers share identical records and last-place tags in the NL Central and will close out a three-game series Thursday from Miller Park.

The Cubs dropped the opener of this series, 9-3, and returned the favor with Wednesday's 5-4 triumph behind a commendable pitching performance from starter Scott Feldman and the bullpen. Feldman got the win and allowed three runs in six innings, while James Russell and Carlos Villanueva each tossed a scoreless inning of relief.

"(Feldman) has done a great job. He can manage an inning when things start to go haywire," Cubs manager Dale Sveum said.

Kevin Gregg permitted a home run in the ninth and held on for his 12th save. He is 12-for-12 in save opportunities this season. Randy Myers had 13 straight successful save chances to begin the 1993 campaign.

Anthony Rizzo went 2-for-4 with a double and two RBI, while Luis Valbuena had two hits and an RBI and Ryan Sweeney added a solo home run for the Cubs, who have alternated wins and losses in the last six games. The Cubs also halted a three-game road slide and a nine-game losing streak at Miller Park.

Chicago is 1-1 on a nine-game road trip, which continues this weekend in Seattle, followed by a visit to Oakland.

Matt Garza has allowed just one run in the last 15 innings pitched and will take the mound for the Cubs Thursday. Garza tossed seven shutout innings in a no-decision against the New York Mets on June 16, then limited Houston to a run in eight-plus innings in a 3-1 win last Friday.

Garza waited out a three-hour, 18-minute rain delay and impressed his manager.

"His fastball had life and (he had) command of it, down and away, and in," Sveum said. "He got his ground balls. His slider got better as the game went on. He did a great job."

Garza, who's 2-1 with a 4.25 earned run average in seven starts and began the season on the disabled list, has faced Milwaukee six times in his career, going 3-1 with a 2.90 ERA.

Milwaukee opened this six-game homestand with three wins in the first four games, but fell to 3-2 on the residency Wednesday.

Aramis Ramirez went 2-for-4 with a homer and two RBI and Juan Francisco added a solo shot for the Brewers, who were hoping Yovani Gallardo could pitch them to a series win over the Cubs. Gallardo gave up five runs -- three earned -- on eight hits and four walks over four innings.

"Tough outing for him. Command, just off," Brewers manager Ron Roenicke said. "He made some good pitches but he didn't have the consistency. He's got good stuff. He should be able to get hitters out easier than what he did tonight."

Gallardo agreed.

"I was leaving the ball up in the zone," he said. "When the ball's up, you're going to get hit no matter who it is."

Ramirez eclipsed the 2,000-hit mark (2,001) and Rickie Weeks continued to swing a hot bat with a 2-for-4 performance. Weeks is hitting .380 with five homers, nine RBI and 12 runs scored in the past 23 games. He was batting .167 before getting back on track.

Scooter Gennett was optioned to Triple-A Nashville after the game with the recent resurgence of Weeks.

"With Rickie swinging the bat as good as he is, we'd like to play Rick more," Roenicke said. "We really like Scooter, we don't want him sitting here. He did a nice job for us. Played good defense, almost had a big hit for us here today."

The Brewers will open a seven-game road trip Friday against Pittsburgh and Washington, and could get outfielder Carlos Gomez back Thursday versus the Cubs. Gomez sprained his left shoulder Sunday making a catch against Atlanta and said he's "a little sore."

Wily Peralta looks to build on his recent superb outing when he takes the mound for the Brewers Thursday. Peralta allowed just two hits over seven scoreless innings of a 2-0 loss to Atlanta on Friday and was 1-6 with a 6.59 ERA in his eight previous starts.

"I just keep the ball down and make big pitches when I need to," Peralta said. "I just go out there every time to keep the ball down, just down as much as I can. This one was my best (start this season) so far."

Peralta never faced the Cubs before this season and is 1-0 with a 2.70 ERA in two starts in 2013. In 16 overall starts, the right-hander is 5-8 with a 5.59 ERA.

Milwaukee is 5-2 against the Cubs so far in 2013 and 19-3 over the last 22 games in this series at Miller Park.