PHOENIX (AP) Pittsburgh starter Joe Musgrove worked out of a couple of jams to help his team build a five-run lead over Arizona after six innings. When he opened the seventh by intentionally plunking Chris Owings, it not only put a runner on, it sparked the Diamondbacks to a massive rally.

Jake Lamb hit a tying-three run homer in the seventh inning and the Diamondbacks scored nine runs after Musgrove hit Owings to rally past the Pirates 9-5 on Monday night.

"It is nothing more than protecting your teammates," Musgrove said. "That is baseball and how the game is played. If you are willing to go out and hit somebody you have to be willing to deal with might come with that."

The Pirates led 5-0 behind Musgrove until the right-hander opened the seventh inning by hitting Owings on the first pitch - retaliation for Josh Harrison being plunked in the top half. Nick Ahmed followed with a run-scoring single, Daniel Descalso had another off Edgar Santana and Lamb tied it at 5-all on a three-run homer to left.

Ketel Marte singled off Kyle Crick (0-1) to lead off the eighth, moved to second on a walk and raced to third after a pickoff attempt at second base by catcher Elias Diaz. Marte scored when the next pitch by Crick bounded to the backstop . Descalso put Arizona up 8-5 with a two-run triple and scored on Dovydas Neverauskas' wild pitch.

Archie Bradley (2-1) worked out of a bases-loaded jam in the seventh inning to set up Arizona's fourth straight win.

"It kind of fired us up there," Diamondbacks starter Patrick Corbin said of Owings getting hit. "I think winning the game is going to sting more for them."

Musgrove was sharp early against the Diamondbacks, working out of jams in the second and sixth inning without allowing a run. His night came unraveled with the plunking of Owings. Musgrove gave up the single to Ahmed was lifted after a throwing error by third baseman David Freese put runners on first and second with no out.

Musgrove allowed three runs - two earned - on five hits with six strikeouts in six innings.

"You play the game and you protect your teammates. It has been going on for 135 years," Pirates manager Clint Hurdle said. "You can't control what other people are going to think. There was a ton of pitches after that, that we weren't able to make."

Corbin was solid his previous outing, holding the San Francisco Giants to a run on four hits in 6 1/3 innings. The left-hander wasn't as sharp against the Pirates.

Corbin allowed five runs - four earned - on six hits and struck out five in 5 1/3 innings.

"Patrick was very good early, then got nicked up," Diamondbacks manager Torey Lovullo said. "There were some key blows inside of that inning, but he rebounded enough to pitch into the sixth inning."

GREAT CATCH

Owings robbed Jordy Mercer of a hit and started a double play in the sixth, catching a deep ball near the wall in center on the run. He got the ball in quickly and the relay throw doubled up Josh Bell at first base, who had rounded second when Owings caught it. The play was upheld by a short video review.

"For me the catch was 1, the quick relay was 1A," Lovullo said. "It was a great baseball play."