SAN FRANCISCO (AP) Bruce Bochy shook hands and greeted former player Dave Roberts, then they walked to opposite dugouts this time to manage against each other as NL West rivals.
''Dave and I go back. He played for me, and we just told each other good luck and let's go at it,'' Bochy said.
And boy did their clubs do just that in an entertaining first 2016 edition of the Dodgers-Giants rivalry.
Hunter Pence hit a grand slam in the eighth inning, Joe Panik drove in three runs and keyed San Francisco's comeback, and the Giants rallied past Los Angeles 12-6 in their home opener Thursday.
''You play all nine innings and you keep going no matter what,'' Pence said. ''Things turn around.''
A 31-inning scoreless streak for Dodgers pitchers ended in the fifth, one inning shy of the record to begin a season set by the 1963 St. Louis Cardinals.
Chris Heston (1-0) worked the sixth in relief of Jake Peavy for the victory as San Francisco erased a 4-0 deficit to the delight of a sellout crowd announced at 41,940.
Bochy's deep lineup gives him multiple options in various situations - and the Giants' bats came to life late.
In the fifth, Los Angeles finally gave up its first runs of 2016 when the Giants got to Alex Wood (0-1). Brandon Crawford drew a leadoff walk, pinch-hitter Kelby Tomlinson singled and Denard Span drove in a run with a groundout before Panik's RBI triple. Buster Posey also doubled in a run.
Angel Pagan hit a go-ahead, two-run single in the sixth.
''We can beat you in many different ways,'' Panik said. ''We never think that we're done.''
Joc Pederson hit a two-run homer on the first pitch he saw from Sergio Romo in the eighth, then Pence connected off Pedro Baez for his sixth career slam and first homer of 2016. Los Angeles' ERA jumped from 0.00 after four innings to 3.09.
The Dodgers challenged a would-be inning-ending double play in the second, questioning whether Panik touched second for the putout. Panik threw to first to retire Wood, who received an RBI groundout on the play after it was overturned on review.
Adrian Gonzalez's second double of the day made it 3-0 in the third when left fielder Pagan missed a tough, slicing ball on the warning track. Scott Van Slyke added a run-scoring double in the fifth before the three-time defending division champion Dodgers squandered their lead to this decade's every-other-year champion Giants.
The Giants outhit the Dodgers 17-13, improving to 37-22 in home openers since moving to San Francisco in 1958 and 13-4 in their current ballpark.
Roberts spent his final two seasons (2007-08) with the Giants and knows this rivalry from both sides. He also played for Bochy in San Diego.
''It's special,'' Roberts said. ''It's real. These are two amazing franchises. Both teams need one another. They came over to the West Coast together. It's great for baseball.''
MOMENT OF SILENCE
Monte Irvin, a Hall of Famer and the first black player in franchise history, and Jim Davenport, an original San Francisco Giant and longtime third baseman who later managed the team and worked in the front office, were remembered in a pregame moment of silence. Both died during the offseason.
Irvin's two daughters threw out ceremonial first pitches.
Dodgers: 2B Howie Kendrick will test his strained left calf at Class-A Rancho Cucamonga with a game as DH, a couple of games at second base and one at third. The plan is for him to be activated for Tuesday's home opener against Arizona - leaving Roberts to balance playing time between Kendrick and 2B Chase Utley. ... C Yasmani Grandal (sore right forearm) will join Triple-A Oklahoma City for games in Nashville. He also is scheduled to return Tuesday. ... 3B Justin Turner, back from knee surgery, had the day off with Yasiel Puig hitting in the No. 3 hole and Kike Hernandez starting at third.
Giants: CF Span still felt some congestion after missing Wednesday's series finale in Milwaukee with a fever and flu symptoms. His parents, Stanley and Wanda Wilson, arrived into town from Florida for his home debut. ... Posey is scheduled to get a break Friday night before catching Madison Bumgarner against Clayton Kershaw on Saturday afternoon.
Dodgers: RHP Ross Stripling makes his major league debut after skipping Triple-A altogether. A 2012 fifth-round draft pick out of Texas A&M, he went 3-6 with a 3.66 ERA pitching for Double-A Tulsa and Class-A Great Lakes last year.
''For me it's just kind of telling him to enjoy the moment, go out there and be himself and compete. You're here because you belong here,'' Roberts said.
Giants: RHP Matt Cain makes his 2016 debut hoping to stay healthy after two seasons shortened by elbow problems.