Bob Melvin will leave the San Diego Padres to become the manager of the San Francisco Giants, sources have confirmed to ESPN.

San Diego granted Melvin permission to interview with the division rival Giants earlier this week, paving the way for the end of a contentious two-year relationship between the Padres and the three-time Manager of the Year.