The lights came on as afternoon faded to evening, and the longest game in the majors this season turned on an error by a third-string catcher who was playing first base.

Wilson Valdez scored an unearned go-ahead run on Brady Clark's double with two outs in the 17th inning yesterday and the Los Angeles Dodgers beat host San Diego, 5-4.

The Dodgers took two of three from San Diego, and have beaten the two-time defending NL West champion Padres four times in six games this year.

"It was just one of those games," Clark said. "It's huge to get that win right there. You play a game that long, if you don't win it, you'd have some miserable people."

Fewer than 24 hours earlier, the teams blew through a 2-hour, 4-minute game won by Greg Maddux and the Padres, 3-2. Yesterday's game took 4 hours, 55 minutes.

Both bullpens were absolutely lights-out, and the game might have gone longer if not for Pete Laforest's fielding error in the 17th.

Valdez reached on a one-out bunt when Laforest reached for a high throw from catcher Rob Bowen and had it hit off the top of his glove. Laforest replaced Adrian Gonzalez during a double-switch three innings earlier.

"I just tried to reach a little bit more," Laforest said. "The ball just rose on me and I couldn't reach any more."

In other NL games:

* At Denver, Colorado shortstop Troy Tulowitzki turned a rare unassisted triple play, and the Rockies beat Atlanta, 9-7, on Matt Holliday's two-run homer in the 11th inning. Kelly Johnson and Edgar Renteria singled for Atlanta in the seventh and were running on a 3-2 pitch when Tulowitzki caught Chipper Jones' line drive behind second base. He stepped on the bag to double up Johnson and then tagged Renteria for the third out.

* At Phoenix, Orlando Hudson hit a tiebreaking two-run double in the seventh inning and Arizona beat San Francisco, 5-4.

* At Pittsburgh, Edwin Encarnacion's bases-loaded triple keyed a comeback from an early three-run deficit, and Cincinnati beat the Pirates, 9-5.

* At Washington, John Maine (4-0) pitched seven sharp innings and Carlos Beltran homered, giving the Mets a 1-0 victory over the Nationals.

* At Houston, Geoff Jenkins homered and Claudio Vargas (2-0) pitched out of three bases-loaded jams, leading Milwaukee to a 3-1 victory over the Astros. *