Offense, get your offense here!

The Colorado Rockies rocked the baseball in San Francisco Thursday afternoon for 14 hits, including the comeback home run in the ninth inning to win 9-8.

This contest was a see-saw affair, in which the Rockies and Giants each led three times — and they were tied 5-5 — until D.J. LeMahieu’s two-run bomb left the building to push the Rockies ahead for the win late in the game.

The game got off to a quick start as Nolan Arenado hit a solo homer into the centerfield bleachers for the 1-0 Rockies lead. But San Francisco’s Brandon Belt belted one off of Jon Gray, a two-run bomb, to steal the lead at 2-1 in the bottom of the first inning.

After some hits left Colorado runners stranded on the bases, the fourth inning brought fireworks.

Colorado scored four in the inning starting with Gerardo Parra knocking a single to score Carlos Gonzalez. Then, Ian Desmond came through huge as his triple scored two more to take the 4-2 lead. That was pushed to 5-2, Rockies, when D.J. LeMahieu singled and scored Desmond.

That lead was quickly erased, though, as Gray gave up three runs in the bottom of the fourth; Joe Panik doubled to score two, then Gorkys Hernandez singled to score one more and knot the game up at 5-5.

That fourth — and then allowing the first two batters to reach base in the fifth inning — ended Gray’s day; he went 4.0 innings, allowing five runs on seven hits while striking out seven. Trevor Story came up with a superb unassisted double play as he caught a line drive and doubled up Belt at second quickly, and Chris Rusin was able to get the final out of the inning without allowing a run.

Fast forward to the seventh inning and Colorado stole the lead back at 7-5. That scoring started when Chris Iannetta singled, followed by a Noel Cuevas double — who pinch-hit for Rusin — and then LeMahieu singled to score those two.

Jake McGee then came in to pitch for the Rockies, allowing San Francisco to get back within a run when Andrew McCutchen doubled to score in the seventh.

And then in the eighth, Adam Ottavino gave up two more runs and gave up the lead, too. Panik singled, Hernandez walked, Buster Posey singled and then Alen Hanson doubled to score two and take the 8-7 advantage after eight innings.

But, the Rockies weren’t dead yet. Iannetta hit a single and then LeMahieu went yard, taking the lead and scoring the winning runs. Wade Davis then came in and retired the side to save the win for the purple and black.

It wasn’t just the road team hitting well in this one, San Francisco hit 12 baseballs of their own, but came up just short.

For Colorado, it meant breaking a four-game losing streak and avoiding a sweep at the hands of the Giants.

The Rockies are now 39-42 on the year, eight games back of the NL West leading Arizona Diamondbacks. Next up, Colorado faces the Dodgers for three games in L.A.