SAN FRANCISCO — After spending two years destroying his former team, Hector Sanchez is returning to the organization.

The Giants and Sanchez have agreed to terms on a minor league deal, general manager Bobby Evans confirmed. Sanchez spent the first five seasons of his big league career in San Francisco before stints with the Padres and White Sox.

In two years with the Padres, Sanchez got 36 at-bats against the Giants and hit five homers and drove in 14 runs. His success became an odd running subplot of the rough 2017 Giants season, but Sanchez — who turned 28 in November — hit just .219 for the Padres last season. Half of his eight homers came with the Giants.

Sanchez was Buster Posey’s primary backup for three seasons. He returns to an organization that is set at the big league level with Posey and Nick Hundley, but does not have much minor league catching depth. It would appear that Sanchez and Trevor Brown are the two catchers currently set to start the season with Triple-A Sacramento. Aramis Garcia, the organization's top catching prospect, finished last season in Double-A.