SAN DIEGO (AP) - Mark Reynolds hit a three-run homer off infielder Josh Wilson with two outs in the 18th inning, sending the Arizona Diamondbacks to a 9-6 win over the San Diego Padres on Sunday in the longest major league game this season.

The Padres were held hitless through nine extra innings by four relievers. Their only baserunners in extras came on three walks. The game took 5 hours, 45 minutes.

The Padres tied it at 6 on David Eckstein's first career pinch-hit homer, a three-run shot, with two outs in the ninth.

The Padres used all their relievers and had starter Chad Gaudin - the loser in Friday night's series opener - pitch the 16th and 17th innings before turning to Wilson in the 18th for his third career relief appearance.

Wilson (0-1) was claimed off waivers from Arizona on May 15, four days after he pitched a scoreless inning for the Diamondbacks against Cincinnati.

Wilson allowed a single to Felipe Lopez and walked Ryan Roberts with one out before Reynolds hit a full-count pitch off an advertising sign atop the right-field wall.

It was Reynolds' first hit of the game after striking out four times. He leads the NL with 81 strikeouts.

Leo Rosales (1-0) pitched 3 1-3 innings for the win.

It was the longest big league game by time and innings since San Diego beat visiting Cincinnati 12-9 in an 18-inning game that lasted 5 hours, 57 minutes on May 25, 2008, according to the Elias Sports Bureau.

Eckstein capped a five-run ninth in this one when he hit a first-pitch fastball from Chad Qualls off the balcony on the second level of the Western Metal Supply Co. brick warehouse in the left-field corner. It was his first homer of the season and his first in 217 at-bats since Sept. 17 with Arizona.

The 5-foot-7 Eckstein, the MVP of the 2006 World Series with St. Louis, has 33 homers in his nine-year career.

It was the third time the Diamondbacks played an 18-inning game.

The Padres have played the two longest games in the majors this year. They beat Cincinnati 6-5 in 16 innings on May 16, taking 5 hours, 14 minutes.

Stephen Drew had four hits for Arizona, extending his hitting streak to 11 games.

San Diego trailed 6-1 going into the bottom of the ninth before rallying with four hits and a walk off two relievers. Adrian Gonzalez got his first hit in four games, a leadoff double off Juan Gutierrez, and scored on Chase Headley's single. Brian Giles walked and Kevin Kouzmanoff flied out, moving Headley to third, before Qualls came on trying to nail down his 13th save in 15 chances.

Nick Hundley hit an RBI infield single to make it 6-3 before being forced out by Chris Burke. Eckstein followed with his homer.

Arizona's Dan Haren held San Diego to one run and four hits in seven innings, retiring 13 straight batters during one stretch. Haren's only mistake was allowing Kevin Kouzmanoff's homer with two outs in the seventh.

The Diamondbacks overcame three early baserunning blunders and piled it on during the fifth and sixth.

The first four Diamondbacks reached and scored against Josh Geer in the fifth. Josh Whitesell hit a three-run double, was sacrificed to third by Haren and scored on Felipe Lopez's sacrifice fly. The Diamondbacks added two more in the sixth on Miguel Montero's sacrifice fly and Chris Young's RBI single.

Geer picked off Reynolds for the second out of the second inning, then Montero overslid second and was tagged out by Edgar Gonzalez, who took the throw from center fielder Tony Gwynn Jr.

Geer picked off Young for the first out of the third, tying both the Padres' individual and team records for pickoffs in a game. He was the ninth Padres pitcher to record two pickoffs in a game and the first since Bruce Hurst picked off Houston's Craig Biggio twice on July 29, 1990.

Notes:@ Diamondbacks OF Justin Upton left with an aggravated left shoulder after striking out in the 10th. ... Adrian Gonzalez extended the club record by walking at least twice in six straight games. Gonzalez has walked six times in the first three games of this four-game series, 13 times in the last six games and 17 times in the last nine.

Copyright 2009 The Associated Press.