– Starling Marte's confidence can be an unwieldy weapon. There is nothing the Pirates outfielder thinks he can't do on a baseball diamond.

That mindset potentially cost the Pirates a valuable run on Saturday against the San Francisco Giants. A short time later, it won them the game.

Marte hit a solo home run off George Kontos into the sun-drenched bleachers in left field with two outs in the ninth inning, lifting the Pirates to a 3-2 victory.

"He's an exciting player," Pittsburgh manager Clint Hurdle said. "He sometimes tries to get some things done and make some things happen."

Marte's second career walk-off came two innings after he was easily caught trying to steal third in a tie game. Jung Ho Kang's second solo homer of the game shortly after Marte made his way back to the dugout erased some of the sting, sure, but then again Marte isn't sure there was anything to apologize for.

"I'm going to keep doing it," Marte said. "If they give me a base, I'm going to take it."

Facing Kontos (2-2) in the ninth, Marte waited on a fastball and didn't miss it to set a career high with his 16th homer of the season.

"I felt I was doing a good job of delivering my pitches, hitting my spots," Kontos said. "But one pitch I didn't execute as well as I'd like, and I think he was sitting on it and took advantage of it."

Kang hit his 11th and 12th homers for the Pirates. Mark Melancon (3-1) needed six pitches to get through the top of the ninth to set up Marte's winner. Pittsburgh's bullpen has won 18 straight decisions, the longest streak in the majors since 1909.