PHOENIX — The Arizona Diamondbacks are doing their best to make it as difficult as possible for the Los Angeles Dodgers to get another NL West title.

Mitch Haniger hit a three-run homer in a five-run sixth inning, and the Diamondbacks beat the division-leading Dodgers 7-3 Thursday night.

Archie Bradley (7-9) struck out seven in six-plus innings and got plenty of run support as the Diamondbacks won their fourth straight and handed starter Rich Hill his first loss with the Dodgers.

The Dodgers had their lead in the division cut to four games when second-place San Francisco beat St. Louis.

“Our guys were fired up,” Diamondbacks manager Chip Hale said. “It’s exciting. It’s good baseball. Good crowd. People are yelling and screaming. Players are getting after it. It’s just good to see in September. We’re not in the hunt to win it. They are. We’re going to do everything we can to beat them.”

The Diamondbacks scored five runs in the sixth off Hill (3-1) and reliever Louis Coleman. Run-scoring singles by Paul Goldschmidt and Brandon Drury preceded Haniger’s second career home run.

Hill, 9-3 with Oakland before being dealt to Los Angeles on Aug. 1, allowed a run for the first time as a Dodger when Kyle Jensen homered off the center-field batter’s eye in the second inning. That ended Hill’s streak of 20 consecutive scoreless innings with Los Angeles.

“Actually he threw the ball well, but we really couldn’t get anything together, muster anything together (offensively),” Dodgers manager Dave Roberts said.

In his last start, Hill had a perfect game for seven innings against Miami last Saturday before being lifted. His career best nine-game win streak ended.

Drury set a Diamondbacks rookie record with an RBI in his seventh straight game.

Arizona added to its lead with Chris Owings’ two-out single in the third to drive in Tuffy Gosewich.

Bradley struck out the side in his first two innings and allowed three runs and nine hits. The Dodgers scored twice in the seventh to chase Bradley. A wild pitch allowed Joc Pederson to race home, and Chase Utley doubled in Andrew Toles.

“I just wanted to give us a chance to stay in it and the offense did their part,” Bradley said. “Even though we’re not a playoff team, we’re still playing the game hard and trying to win baseball games. It’s fun to get fired up a little bit and get the competitive juices flowing.”

Patrick Corbin earned his first save by pitching three scoreless innings. The Diamondbacks’ four-game home winning streak is the longest since July 2014, also four games.

BENCHES EMPTY

Both dugouts and bullpens emptied in the top of the fifth after Hill attempted to reach on a bunt attempt. Hill shouted at Bradley as he ran up the first-base line, then gestured at Bradley again after he was thrown out. Bradley shouted back at Hill, and players from both teams streamed onto the field.

Bradley’s pitch to Hill on the bunt was well inside and at Hill’s hands.

“It’s just two guys playing the game hard. Nothing more than that,” Bradley said. “I was going in before he squared to bunt. Maybe the pitch was more in than it should have been, I don’t know.”

It took only a few moments for order to be restored though both benches were warned by home plate umpire Ron Kulpa. The Dodgers proceeded to score their first run after Bradley walked Utley, then with two outs, Justin Turner doubled to the right field wall to drive in Utley.

Hill faced Bradley the very next inning and struck him out looking.

“There was no ill will or anything like that. Just competitive and got excited,” Hill said. “The pitch was supposed to be inside, it just missed. Maybe being a pitcher I got a little too excited.”

TRAINER’S ROOM

Dodgers: LHP Alex Wood, on the 60-day disabled list with an elbow injury, could soon be activated, but as a reliever. Wood went on the DL on May 31 and made 10 starts before that, going 1-4 with a 3.99 earned run average.

Diamondbacks: Hale said pitcher Rubby De La Rosa, who exited Wednesday’s start in the second inning, will be shut down from major-league games. Hale said De La Rosa’s health is fine though his elbow has bothered him. Braden Shipley will take De La Rosa’s rotation spot. “I just want to feel 100 percent ready,” De La Rosa said.

UP NEXT

Dodgers: RHP Kenta Maeda (14-9) is already tied for second in wins in a season by a Los Angeles Dodgers rookie. He faces Arizona, against which he faced and won on Sept. 5 at Dodger Stadium.

Diamondbacks: RHP Zack Greinke (12-6) lost to the Dodgers the last time he faced his former team, rocked for eight runs on nine hits including five home runs in Los Angeles. He’s set for his seventh career start against the Dodgers.