Updated

San Diego Padres pitcher Clayton Richard was thrilled to hit his first career home run. He just wished it came in a winning outing.

Instead, Richard (14-14) gave up three home runs to the Milwaukee Brewers as Milwaukee beat the Padres 5-3 on Monday night.

"I'll take a win over a homer every time," Richard said. "Every pitcher would say that. But it's definitely neat to be able to do that (hit a home run). It was just more luck than anything."

Richard even got the ball back from a Brewers fan, trading a handshake and an autograph.

He gave up five runs and 10 hits in seven innings for his second straight loss after winning five straight decisions. He said he was not executing his pitches.

"They jumped on everything I didn't execute," he said.

Padres manager Bud Black said the home runs came back to haunt Richard.

"It started out looking like he was going to help his own cause," Black said. "The difference was we got out-homered. When that happens, it usually results in a defeat."

Black said the Padres had Brewers starting pitcher Shaun Marcum on the ropes in the third inning, with the bases loaded after Richard's home run , but Marcum got Yonder Alonso to fly out to end the inning.

"We stressed him (Marcum), but couldn't break him," Black said.

Marcum (7-4) gave up two runs and six hits in six innings. Marcum was likely making his last start for the Brewers as the team is not expected to re-sign the veteran pitcher. It was his second straight victory after not winning a game since June 8 as he spent two months on the disabled list with right elbow tightness before being activated Aug. 25.

Brewers manager Ron Roenicke said Marcum was good enough to get the win.

"He mixed speeds well and really battled," Roenicke said. "We always knew Shaun knew how to pitch. It is just a question of keeping him healthy."

With the win, the Brewers clinched a winning season for the second straight year. The Brewers won 28 of the last 40 to turn the season around and make a run at an NL wild card before being officially eliminated after a loss on Sunday.

The Brewers grabbed a 1-0 lead in the first. With two outs, Ryan Braun lined a double down the right-field line and scored on Aramis Ramirez's RBI single.

Richard's first career home run with one out in the third inning tied the score at 1-1 for the Padres.

Carlos Gomez's career-high 19th home run of the season gave the Brewers a 2-1 lead in the fourth inning. Gomez's previous high was eight in 2011.

Rickie Weeks' two-run home run in the fifth inning boosted Milwaukee's lead to 4-1. It was the Brewers' 200th home run of the season, the second straight season the team has hit that mark and only the fifth time in team history.

Jesse Guzman's RBI single in the sixth inning scored Will Venable for the Padres to cut the lead to 4-2. Venable had doubled down the right field line and then stole third base.

Jonathan Lucroy's 12th home run of the season in the sixth inning increased the Brewers' lead to 5-2.

San Diego pulled to 5-3 in the seventh inning on Yasman Grandal's RBI single.

NOTES: Padres manager Bud Black said RHP Casey Kelley will not make his scheduled start Tuesday due to general arm and elbow soreness. RHP Anthony Bass (2-7) will start in his place. ... Brewers manager Ron Roenicke had a team meeting before the game to tell his team he was pleased with the way they had played in the last month to get back into the NL wild-card race. ... Green Bay Packers quarterback Aaron Rodgers visited Braun in the clubhouse before the game. The two are close friends and are involved in the ownership of a Milwaukee-area restaurant together