Updated

Shaun Marcum tossed six solid innings and was backed by three home runs as the Milwaukee Brewers posted a 5-3 win over the San Diego Padres at Miller Park.

Rickie Weeks had a two-run homer and Carlos Gomez and Jonathan Lucroy delivered solo shots as Milwaukee bounced back from Sunday's 7-0 loss to Houston that officially eliminated the club from playoff contention.

Marcum (7-4) worked around four walks to hold San Diego to two runs on six hits, and John Axford struck out the side in the ninth to nail down just Milwaukee's third win in its last eight contests.

"Shaun was mixing his pitches well, and that allowed him to get out of trouble," said Lucroy. "He had some trouble early on, but we were able to jump on [Padres starter Clayton] Richard."

Richard (14-14) hit his first career home run, but the left-hander served up the three Milwaukee long balls and all five runs over a seven-inning stint to take the loss.

"It started out looking like he was going to help his own cause, but the long ball came back to hurt him," Padres manager Bud Black said of Richard.

Will Venable finished 3-for-4 and Yasmani Grandal recorded a pair of hits with an RBI for San Diego, but the Padres stranded nine baserunners and fell for the fifth time in six outings.

Gomez snapped a 1-1 tie in the bottom of the fourth with his 19th homer of the season, while Weeks increased Milwaukee's lead when he followed Norichika Aoki's single with a towering blast over the wall in straightaway center an inning later.

San Diego would pull to within 4-2 when Venable doubled in the sixth and crossed the plate on Jesus Guzman's base hit, but Lucroy gave the Brewers back a three-run cushion by taking Richard deep to begin Milwaukee's half of the frame.

Grandal singled off reliever Jim Henderson to bring in Everth Cabrera in the seventh and cut the Padres' deficit to 5-3, but Francisco Rodriguez held San Diego scoreless in the eighth before Axford came in to notch his 34th save of the season.

Aramis Ramirez gave Milwaukee a quick 1-0 lead when he followed a Ryan Braun double with a single through the right side in the bottom of the first inning, but the Padres would draw even on Richard's first career home run -- a shot into the second deck in right field with one out in the third.

Marcum would later walk the bases loaded in that inning, but avoided further damage by getting Yonder Alonso to line out to left to end the frame.

"We had him on the ropes," said Black. "We stressed him out, but we couldn't break him."

Game Notes

Braun finished 2-for-4 to extend his hitting streak to 11 games, in which he's hitting .452 (19-of-42) ... Marcum improved to 4-0 with a 3.41 ERA in five career starts against the Padres ... The three homers gave Milwaukee 202 for the season, marking the fifth time in franchise history and first time since 2007 they've had at least 200.