DENVER (AP) — Raimel Tapia hit a tying, bases-loaded triple and scored the go-ahead run during a five-run eighth inning, and the Colorado Rockies beat the Arizona Diamondbacks 8-7 on Sunday.

The rally salvaged the finale of the three-game series and ended Arizona’s six-game road winning streak. Eduardo Escobar and Blake Swihart homered for the Diamondbacks.

The Rockies trailed 7-3 when they loaded the bases with no outs against reliever Archie Bradley (1-3). David Dahl walked on a full count and Tapia tripled to left.

Ryan McMahon followed with an RBI single through a pulled-in infield.

“I was trying to go up and in, and I think it was just middle-up,” Bradley said.

“Really since the first hitter, just kind of really didn’t have good stuff and was just trying to make some pitches here and there. When you fall behind like, no outs, guys are going to be super aggressive and that’s what they did.”

Scott Oberg (1-0) allowed two runs in the eighth but got the win, and Wade Davis got the final three outs for his fifth save. It was just the sixth win in 15 home games for the Rockies.

Swihart came into the game hitting .071 but hit a two-run drive against starter German Marquez in the sixth to give Arizona a 5-3 lead. Marquez had tied it in the fifth with a two-run bloop single, but Zack Greinke worked out of the no-out jam without any further damage.

“Fundamentally I think we broke down in the eighth inning and we ended up absorbing a tough loss,” Diamondbacks manager Torey Lovullo said.

Marquez struck out nine over six innings but allowed five runs and seven hits.

Escobar’s home run leading off the second tied it at 1, and Arizona took a two-run lead in the third on an RBI double by David Peralta and a sacrifice fly from Escobar.

UP NEXT

Diamondbacks: RHP Merrill Kelly (3-2, 3.60) will open a three-game series at Tampa Bay on Monday night.

Rockies: RHP Antonio Senzatela (2-1, 4.03) will face San Francisco LHP Madison Bumgarner when Colorado’s homestand continues on Tuesday.