Peavy (7-5) won his third straight start, allowing four hits and a walk.
Franklin (6-5) baffled the Padres through five innings, retiring the first 10 hitters and issuing just one walk. Mendez led off the sixth with a disputed double down the left field line.
Mendez's ball was close to being foul, although third base umpire Joe Brinkman did not hesitate in calling it fair. Franklin and Seattle manager Bob Melvin argued unsuccessfully.
After Peavy sacrificed, Mark Kotsay delivered a two-out double to score the game's first run.
Peavy was replaced by Jay Witasick, who allowed one run in one inning before Mike Matthews retired the only batter he faced. Rod Beck worked a perfect ninth.
2014: The Year in Music [PHOTOS]