PHOENIX (AP) Archie Bradley's status as an Arizona Diamondbacks fan favorite grew on Sunday, with the bearded reliever striking out the side in the ninth inning for his first career save.

Bradley, appreciated for his rah-rah energy and expressive nature along with a blazing fastball, got the call to finish the game in place of closer Fernando Rodney and came through, helping the Diamondbacks to a 3-2 win over the San Diego Padres.

"Keep that same mentality, attack, throw the ball the way you have all year," said Bradley, the Diamondbacks' top setup man with a 1.23 earned run average. "I love this team. I love everyone involved in it. I just want to win. Rodney's our guy. We believe in Rodney. I believe in Rodney more than anyone in the world.

"This is the best year of my life, 25 years or going on 25. ... I love being here every single day."

Bradley had been told beforehand that he'd finish the game in a save situation with Rodney unavailable a day after he faced six hitters while blowing a save in an 8-7 loss.

"He looked very comfortable in that environment," manager Torey Lovullo said of Bradley. "There's no controversy. Fernando's still our closer."

Martinez hit solo drives in the second and sixth innings, the latter breaking a 2-2 tie. He has reached safely in 14 straight games and has 37 home runs this season. He hit 16 in 57 games with Detroit and 21 in 45 games since Arizona acquired him. Six of Martinez's seven career multi-home run games have come this season, four with Arizona.

Ray (13-5) won his fourth straight start, striking out 12 in six innings while allowing two runs and four hits. Arizona remained five games ahead of second-place Colorado for the NL's top wild card.

"The challenge with him is his fastball up looks so good to swing at and nobody hits it," Padres manager Andy Green said of Ray.

Goldschmidt's 34th home run, his first since Aug. 30, gave the Diamondbacks a 2-1 lead in the fourth. Yangervis Solarte tied the score with a sacrifice fly in the sixth.

Luis Perdomo (7-10) gave up three runs and five hits in six innings.

Luis Torrens hit an RBI single in the second, a hard-hit ball up the middle that just missed Ray's head as the crowd groaned. Ray missed almost a month after being struck by a line drive in late July.

"Comebackers are part of the game. Fortunately I was able to get out of the way of it," Ray said.

Wil Myers struck out twice and raised his season total to 162, two more than the previous Padres record set by Mike Cameron in 2007.

"We're of the belief that guys being on the field consistently is probably better than having them sit on the bench at the big-league level," Green said.

FIRST TIME FOR EVERYTHING

When Arizona wasted a 7-2 ninth-inning lead in its loss Saturday night, it marked the first time the Diamondbacks lost with a lead of five or more runs entering the ninth, according to the Elias Sports Bureau. They had won their first 436 games in that situation. Four franchises remain that have not lost when entering the ninth ahead by five or more: the Marlins, Padres, Rangers and Rockies.

TRAINER'S ROOM

Diamondbacks: RHP Randall Delgado was placed on the 60-day DL with right elbow inflammation, and the club recalled INF-OF Christian Walker from Reno. Walker, the Pacific Coast League's MVP, pinch hit in the seventh inning and flied out. ... Goldschmidt told Lovullo he felt fine after playing Saturday, his first game after missing five with an elbow problem. ... C Chris Iannetta got the day off, a little sore after being hit on an arm by a pitch Saturday.

Padres: Pirela appeared to hurt a hand sliding into third base in the sixth and was checked by a trainer but stayed in the game.