Barry Bonds hit two home runs to move to within 18 of tying all-time leader Hank Aaron as the San Francisco Giants claimed an 8-5 victory at Pittsburgh.
Bonds hit his 736th homer in the second inning and followed with another in the fourth before leaving the game.
"It was a great day for Barry," said Giants manager Bruce Bochy. "We're trying to get this offence going, and he really made that happen."
Bonds, 42, had previously belted only one home run this season.
His pursuit of Aaron's all-time record is mired in controversy because of his links to the Balco steroids scandal which saw his personal trainer jailed.
Bonds has always denied knowingly using any prohibited performance-enhancing substances.
But, despite his protestations of innocence, many baseball fans regard his achievements as being tainted.