Cole Hamels maintained his focus and walked away a winner after 3½ hours of dreary baseball Wednesday night.

"I'm glad I play it, but I wouldn't be watching it," he said.

Hamels pitched seven strong innings and handed himself some much-needed run support, sending the Phillies to a 6-2 victory over the New York Mets.

Carlos Ruiz homered and the Phillies overcame a couple of mental mistakes by Jimmy Rollins to win for only the third time in 17 road games. Hamels hit a two-run single to help Philadelphia improve to 8-5 under interim manager Ryne Sandberg.

This was no masterpiece, though.

Mets starter Daisuke Matsuzaka took an interminable amount of time between pitches and threw 82 over the first three innings. Hamels worked at a much faster pace but irritated fans by making seven straight tosses to first base with Eric Young Jr. aboard.

Young stole second anyway.

One night after Jonathon Niese's three-hit shutout for the Mets lasted 2 hours, 19 minutes, that's how long it took to play 5½ innings in a game between also-rans that ultimately dragged on for 3:32.

About halfway through, a television camera fixed on Phillies pitcher Cliff Lee spinning a crushed water bottle in the dugout.

"Unfortunately, sometimes when you have games like this, you just have to go out there and try to be effective from pitch one and make sure that your warmup pitches are right on par," Hamels said. "It's a lot of self-motivating and just trying to stay in the game as much as possible, which is a lot easier said than done."

Matsuzaka (0-2) labored through 4 1/3 innings on Japanese Heritage Night in his second start for the new-look Mets, who have dropped six of seven. Depleted by key injuries and Tuesday's trade that sent Marlon Byrd and John Buck to Pittsburgh, New York fell to 2-6 on a nine-game homestand.

"Today's game was pretty self-explanatory, I think," Matsuzaka said through a translator. "I was all over the place today, all over the zone."

The Mets made three errors after going six games without one, which matched a season high.

Hindered by the fifth-worst run support in the majors this season, Hamels (6-13) worked around nine hits and improved to 2-0 with a 2.00 ERA in six August starts. The left-hander struck out eight, walked one and upped his career record to 7-12 against the Mets.

"He's pitched well all year," Sandberg said.

While rain postponed afternoon tennis matches at the U.S. Open next door, the Phillies and Mets stayed dry throughout a drab evening that matched the pace of the game.

Hamels grounded a two-run single to left field off reliever Robert Carson in the fifth to make it 4-1. That gave Hamels, a career .170 hitter entering the game, four RBIs this season and answered a three-run double by Niese the previous night.

"That was huge," Sandberg said.

Rollins failed to cover third base on a third-inning popup along the third base line. Noticing that the shortstop was flat-footed, the speedy Young alertly tagged up at second and beat Rollins and Ruiz to the bag.

Ike Davis followed with an RBI single on an 0-2 pitch, his 10th hit in 67 at-bats (.149) against left-handers to that point.

Rollins made up for his gaffe with a tying double in the fourth — but got cut down at third for the third out. It was Rollins' first RBI in 15 games, his longest drought since August 2005, according to STATS.

A ground-rule double by Michael Young set up the Phillies in the fifth and made him 10-for-17 (.588) off Matsuzaka, who forced in the go-ahead run by hitting John Mayberry Jr. with a pitch.

That was it for Matsuzaka, charged with four runs, four walks and six hits in his second major league start of the season.

"He's definitely deliberate, but like I said, you have to adapt and adjust to his pace of play because ultimately he controls it," Mayberry said.