Smith will earn $13 million in the first two years of the deal, a baseball source confirmed, and the club option year is for $7 million.
The extension appears to take a prime San Diego trade chip off the market in advance of baseball's non-waiver deadline later this month. Smith, who would have been eligible for free agency in November, had been mentioned in speculation as a popular target for pennant contenders in search of a bat.
Smith, 31, has been one of the few bright spots for a Padres team that ranks at or near the bottom of the majors in multiple offensive categories this season. He's hitting .281 with an .890 OPS and a wins above replacement of 3.0. He's batting .322 with 12 doubles, four triples and seven home runs in 42 games at Petco Park.
The Colorado Rockies chose Smith out of the University of Mississippi in the second round of the 2004 first-year player draft. After five seasons with the Rockies, he was traded to the Oakland Athletics in 2012.
San Diego then acquired him from the Athletics in a trade for relief pitcher Luke Gregerson in December.
The Padres recently fired general manager Josh Byrnes and are conducting a search for his replacement. Senior vice president Omar Minaya and assistant general managers A.J. Hinch and Fred Uhlman Jr. are running the team on an interim basis.