The Pirates snapped a nine-game losing streak at Dodger Stadium that dated back to Sept. 16, 2011, on Thursday night, to open their west coast swing with a bang.

Gerrit Cole gave the club a big start in a return to his native California. Pedro Alvarez and Russell Martin powered home runs off Dodgers starter Dan Haren, and a seventh inning rally fueled by a Josh Harrison RBI single with two outs earned the Pirates a 6-3 win.

It was perhaps, among the club’s most complete wins of the season.

“Really fun to watch us get out there and play that game tonight,” manager Clint Hurdle said. “Cole gave us the big start, momentum off the mound, the energy. Great pace and rhythm tonight for him. Probably the best speed variance he’s had in quite some on the mound from the fastball to changeup. The curveball played extremely well. Everybody fed off it.”

Cole, who starred at nearby UCLA, gave up a run in both the first and second innings before retiring 10 straight. He went 6⅓ innings, giving up six hits, three earned runs and two walks. He struck out three.

Manager Clint Hurdle quickly went to reliever Tony Watson when Cole issued a seventh inning walk. Watson induced a double play to end the inning, then Mark Melancon moved back into his setup role and pitched a perfect eighth inning, downing the No. 2-3-4 batters with a groundout and two strikeouts.

Jason Grilli returned to his role as closer to put the Dodgers down in order for the save.

“I thought we played Pirate baseball to a tee,” Cole said. “We passed the baton on the plate, played (good) defense, threw a lot of strikes, pitched in, and took some punches. It’s about stringing quality games together for us right now. ... It’s about playing our type of baseball.”

The Pirates, losers of two straight in New York, carried the worst road record in baseball (7-16) to the west coast with them.

“We knew when we left New York, everything was left in New York,” Harrison said. “We just basically said, new series. When you’ve got two teams battling back and forth -- we got on the board, they got on the board -- it was going to be a matter of time when somebody got a little more than one more run. We ended up having one big inning and it ended up being the difference maker.”

The Dodgers got on the board quickly.