CARSON, Calif. -- Steven Gerrard enjoyed a winning MLS debut Friday night, twice setting up Robbie Keane goals and netting one of his own as the LA Galaxy rallied from a two-goal first-half deficit for a wild 5-2 triumph over the San Jose Earthquakes to vault into the Western Conference lead.
Keane scored his second successive hat trick in MLS play, converting two penalty kicks and netting the 64th-minute winner in a vibrant clash played in front of a sellout crowd of 27,000 at StubHub Center that included former Galaxy star -- and Gerrard's former England teammate -- David Beckham.
Gerrard drew the penalty kick that Keane converted after a half-hour, netted an equalizer in the 37th minute, then set up Keane's finish on the winning strike with a precisely placed free kick.
Keane added an 80th-minute penalty kick after San Jose goalkeeper David Bingham tripped Baggio Husidic after diving to deny Keane at the left post -- Gerrard's rebound ricocheted off the fallen Husidic and into the net, but referee Alan Kelly had already whistled the foul -- and Sebastian Lletget added a header in the 91st minute.
LA scored five goals for the third time in four league home games, after last month's 5-1 rout of Philadelphia and 5-0 romp over Portland. They've outscored their last four MLS opponents at StubHub 19-3.
The comeback, which gave LA (9-6-7) a two-point edge on Seattle, Vancouver and FC Dallas in the West, spoiled a tremendous start for the Earthquakes (7-8-4), who went ahead on goals in the 22nd and 25th minutes by Quincy Amarikwa, making his second start up top since San Jose acquired him from Chicago last month.
Gerrard, who had played 45 minutes in LA's victory last weekend over Mexico's Club America in an International Champions Cup friendly and in Tuesday's US Open Cup quarterfinal loss at Real Salt Lake, played into the 88th minute for LA as an attacking midfielder in a 4-2-3-1 alignment.
The Galaxy dominated possession from the outset, but San Jose was sharper, at least for the first half-hour, and Amarikwa should have opened his account in the 12th minute, when a Fatai Alashe ball over the top left him one-on-one with goalkeeper Brian Rowe. Amarikwa's touch took the ball too far to the left, and he fired right at a retreating Rowe.
He was more precise with his next two chances, giving San Jose a 22nd-minute lead, then doubling the advantage three minutes later.
Sanna Nyassi, maybe the best player on the field for the first 45 minutes, took a ball up the right flank from Marvell Wynne, then played it behind three LA defenders, and Amarikwa slotted it home with a first-time shot from the edge of the 18.
The goal was San Jose's first in 220 minutes, following successive shutout losses to Portland and Houston, and it ended LA's 234-minute home shutout streak.
The second goal came from a set piece about 11 yards outside the box. Matias Perez Garcia chipped the ball into the middle of the area, and it fell to the turf. Amarikwa quickly swept it inside the right post.
The Galaxy, who had conceded just two goals at home in 612 minutes before giving up two to Amarikwa in a matter of minutes, answered almost immediately.
Gerrard won a penalty kick when Tommy Thompson elbowed him in the face as they contested a high, looping clearance, and Keane fired to the right side of the net just as the clock hit 30.
Gerrard scored the equalizer seven minutes later. The Englishman picked up a ball in his defensive half, carried it about 20 yards, then played a pass behind Keane, who backtracked to collect the ball and sent it to Husidic on the right flank.
Husidic played a sharp ball into the middle of the box for Lletget, but it deflected off a sliding Clarence Goodson's leg to Gerrard, who deposited it into the right side of the net.
LA's command on the game grew more pronounced in the second half, and they nearly took the lead when Lletget volleyed a Keane cross off the underside of the crossbar in the 53rd minute.
The Galaxy scored the winner 11 minutes later, on Gerrard's first free kick for the club, from just to the left of the box, about 5 yards from the end line. Gerrard blasted the ball to the near post, and Keane got a step inside Alashe to touch it home.
Gerrard nearly had a second in the 70th minute, when he put a 27-yard free kick off the crossbar. Keane's second penalty secured the three points.
Both teams have International Champions Cup friendlies on Tuesday -- the Galaxy against Barcelona at the Rose Bowl and the Earthquakes against Manchester United at Avaya Stadium -- before returning to MLS action next weekend. LA travel to Houston next Saturday and San Jose visit Vancouver the following day.