Yankees starting pitcher C.C. Sabathia (12-3) allowed one run over seven innings to pick up the win, his eighth consecutive victory. He is one of eight Yankees selected to go to the All-Star Game.
"He just finished off what he started on Tuesday. Outstanding starting pitching," Yankees manager Joe Girardi told reporters.
The Mariners did themselves no favors with a pair of errors in the first inning that led to two runs, and a wild pitch in the third allowing the Yankees to extend their lead to 3-0.
Two more wild pitches in the fourth inning marked the end for Mariners starter Ryan Rowland-Smith (1-9), who allowed six runs on six hits with a walk and a strikeout.
"It's tough," Rowland-Smith said. "Like I said, with that lineup you can't give them that many chances. They're going to capitalize on them and that's what they did."
Robinson Cano led off the fifth inning with a double off Mariners' reliever Brian Sweeney and two batters later Thames launched a two-run home run to complete the Yankees' scoring.
The Mariners scored a run in the sixth inning on three consecutive singles off Sabathia, and added another in the bottom of the ninth with a solo home run by Casey Kotchman off reliever Dustin Moseley.
(Reporting by Mike Mouat in Windsor, Ontario; Editing by Peter Rutherford)