MILWAUKEE (AP) — Ryan Braun thinks his luck may have changed at the plate.

The Milwaukee Brewers will take all the help they can get in chasing the NL Central-leading Chicago Cubs.

Braun hit two homers, including a go-ahead solo shot in the eighth inning that bounced off right fielder Nicholas Castellanos’ glove and over the fence, and the Brewers beat the Detroit Tigers 6-5 on Friday night to stay one game back of Chicago.

“Certainly we’ve had more than enough discussion of how unlucky I’ve been this year, so maybe my luck is turning on that,” Braun said. “Even if it doesn’t, just getting lucky on that single scenario is obviously huge for us based on where we’re at in the season.”

Already assured a playoff spot, the second-place Brewers (93-67) are running out of time to catch the Cubs. Chicago beat St. Louis 8-4 on Friday afternoon.

The Brewers, who have won five straight, need the Cubs to lose at least once over the next two days to have a chance to win the Central.

Braun also hit a solo homer in the first and doubled in the fifth.

His good luck in the eighth came at the expense of Castellanos, who was tracking the high fly to the wall.

“If he doesn’t put a glove on it, it doesn’t go over the fence,” Milwaukee manager Craig Counsell said. “We caught a break.”

The ball bounced off Castellanos’ glove raised over his head, then rolled over the top of the padded fence for a homer off Victor Alcantara (1-1).

“Warning track, saw it, jumped up. Felt it in my glove. My glove hit the top of the fence,” Castellanos said. “When I came back down, it wasn’t in my glove.”

Jeremy Jeffress hit leadoff batter Jacoby Jones with a pitch in the forearm to start the ninth before retiring the next three Tigers for his 14th save.

STUNNING SWING

The Brewers looked as if they had a crucial win locked up in the top of eighth with normally lights-out reliever Josh Hader on to pitch with a two-run lead.

But pinch-hitter Dawel Lugo turned on a 96 mph inside fastball for a two-run homer to left that tied the game at 5 with nobody out. Lugo’s first major league homer came after leadoff hitter Jeimar Candelario was hit by a pitch in a call that stood after a replay review.

“A kid like that in this atmosphere and bangs one like that. It’s just incredible. We did a lot of really, really good things tonight,” Tigers manager Ron Gardenhire said. “Unfortunately, we lost the game.”

Until then, the night belonged to Christian Yelich, the Brewers’ MVP candidate who hit a two-run homer in the first after reuniting with his brother.

With Milwaukee trailing 3-0, Yelich hit his 34th homer of the season on the first pitch from Jordan Zimmerman after leadoff hitter Lorenzo Cain singled. Three batters later, Braun hit a solo shot to left to tie the game.

AFTER THE FIRST

The Tigers couldn’t muster any offense for a while after scoring three runs off Zach Davies in the first on three straight RBI singles from Niko Goodrum, Jim Adduci and James McCann. The runs came on bloopers or soft bouncers that found holes in the infield.

Davies and two relievers then combined to frustrate the Tigers for the next six innings, retiring 17 in a row during one stretch.

Lugo’s homer off one of the toughest left-handed relievers in baseball gave the Tigers new life.

Joakim Soria (2-1) got the win after getting the last two outs of the eighth in relief of Hader.

YELICH BROTHERS

The 26-year-old Yelich caught a ceremonial first pitch from his 22-year-old brother, Cameron, who was recently discharged from the Marines. It was the first time Cameron had watched a big league game in at least a couple of years, and the first time he had seen his brother play at Miller Park for the Brewers. Christian Yelich was acquired in a trade with the Miami Marlins in January.

TRAINER’S ROOM

Tigers: OF Christin Stewart missed the game with what Gardenhire called “stomach issues.”

Brewers: The team’s latest injury had nothing to do with a player. Brewers owner Mark Attanasio recently underwent successful surgery to repair a torn left Achilles tendon. Attanasio, who was in attendance on Friday, said he hurt himself running across the beach at Malibu to rescue his family dog after it got tangled up with a pit bull. Attanasio helped his wife, Debbie, separate the two dogs, but said he didn’t realize the extent of his injury. He cannot put any weight on his leg until mid-October.

UP NEXT

Tigers: LHP Daniel Norris (0-5) makes his first career appearance against Milwaukee.

Brewers: LHP Wade Miley (5-2) has no record with a 6.19 ERA in three career starts versus Detroit.

Brewers 6, Tigers 5

DetroitMilwaukee
abrhbiabrhbi
Cndlrio 3b3100Cain cf4110
H.Cstro 2b3110Yelich rf-lf2212
D.Lugo ph-2b1112Aguilar 1b4010
Cstllns rf3110Hader p0000
Goodrum ss-1b4111Soria p0000
Adduci 1b3011Jffress p0000
A.Wlson p0000T.Shaw 2b-1b4000
Mahtook ph1000Braun lf4232
V.Alcnt p0000Broxton rf0000
J.McCnn c4021Mstakas 3b4021
J.Jones cf3000Kratz c4000
V.Reyes lf4000O.Arcia ss4120
Zmmrmnn p1000Davies p0000
Sltlmcc ph1000D.Sntna ph1011
Hardy p0000Wodruff p0000
Ro.Rdrg ss2000Thames ph1000
Knebel p0000
H.Perez 2b0000
Totals33575Totals326116
Detroit300000020—5
Milwaukee30110001x—6

DP_Detroit 1, Milwaukee 1. LOB_Detroit 4, Milwaukee 5. 2B_Braun (24), O.Arcia (16). HR_D.Lugo (1), Yelich (34), Braun 2 (20). S_Davies (4).

IPHRERBBSO
Detroit
Zimmermann485524
Hardy120001
Wilson200004
Alcantara L,1-1111100
Milwaukee
Davies453303
Woodruff200003
Knebel H,6110003
Hader BS,51-312210
Soria W,2-42-300001
Jeffress S,14-19100000

HBP_by Hader (Candelario), by Jeffress (Jones).

Umpires_Home, Alfonso Marquez; First, D.J. Reyburn; Second, Sam Holbrook; Third, Jim Wolf.

T_3:07. A_44,770 (41,900).