SAN FRANCISCO -- Emergency San Francisco Giants starter Yusmeiro Petit shut out the San Diego Padres on three hits over six innings, and his San Francisco teammates backed him with the club's first two-home run first inning at home in almost six years, leading the Giants to a 6-0 victory Tuesday night.

In evening the three-game series at a win apiece, the Giants had to change pitchers about an hour before game time when scheduled starter Matt Cain cut his right index finger on a knife in the clubhouse and had to be scratched.

No stitches were required, but Giants manager Bruce Bochy had to call upon Petit (2-1), who had not pitched since a four-inning relief stint in Colorado last Monday.

He responded with near-perfect pitching for six innings against a Padres lineup missing second baseman Jedd Gyorko (paternity leave), third baseman Chase Headley (strained right calf) and left fielder Seth Smith (strained right groin).

After retiring the first nine batters in order, Petit allowed fourth-inning singles to shortstop Everth Cabrera and left fielder Chris Denorfia that sandwiched a double-play grounder. He also allowed a sixth-inning double by Padres reliever Donn Roach.

Petit struck out four and did not walk a batter in easily his longest outing of the season.

The Giants gave Petit plenty of support, with center fielder Angel Pagan and first baseman Buster Posey smacking first-inning home runs off Padres left-hander Eric Stults (1-3), and catcher Hector Sanchez driving in three runs with a single and sacrifice fly.

Right-handers Jean Machi and Santiago Casilla provided three innings of no-hit relief for Petit, completing the Giants' second shutout of the season.

The Giants out-hit the Padres 9-3, with the first seven hitters in the San Francisco lineup contributing at least one hit. Pagan was the only player in the game with two hits.

Roach limited the Giants to one unearned run on two hits in 4 ? innings in relief of Stults.

It didn't take long for the Giants to rough up Stults, who allowed only one run in six innings when he beat San Francisco 2-1 in San Diego 10 days earlier. Pagan belted the left-hander's third pitch of the game just inside the left field foul pole for his seventh career leadoff homer, and Posey, batting third, blasted a second solo shot into the bleachers in left-center seven pitches later.

Stults nearly got out of trouble in what turned out to be his final inning, the third, when he got Giants left fielder Michael Morse to ground into a 1-2-3 double play with the bases loaded and no outs.

However, he fell behind in the count 3-0 to Pablo Sandoval, prompting the Padres to intentionally walk the slumping third baseman to reload the bases. Sanchez then delivered two runs with a single to center field, and shortstop Brandon Crawford made it 5-0 with an RBI single to right.

Stults was pulled at that point, having allowed five runs on seven hits. He walked two and struck out one.

Sanchez's third RBI came on a sacrifice fly against Roach that scored pinch runner Juan Perez in the fifth, increasing the San Francisco lead to 6-0.

NOTES: Giants RHP Matt Cain's half-inch cut on his right index finger is not expected to keep him from making his next scheduled start, Monday at Pittsburgh. ... Cain finished the month of April winless for the second consecutive season. He went 0-2 with a 6.49 ERA last April, 0-3 with a 4.35 ERA this April. ... The last time the Giants hit two home runs in the first inning at AT&T Park was July 22, 2008, when OF Fred Lewis and C Bengie Molina did the damage against the Washington Nationals. ... Padres 2B Jedd Gyorko is expected to return to the team for the series finale Wednesday following the birth of twin boys Monday night. Gyorko left the team on paternity leave Monday morning. ... The Padres also expect OF Seth Smith to return to the starting lineup Wednesday. Smith strained his right groin last Thursday in Washington. ... Padres RHP Donn Roach recorded his first career hit, a double to right-center in the sixth inning. ... Padres C Yasmani Grandal made his first career start at first base.