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.
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards