A mechanical adjustment in between starts helped A.J. Burnett out of a funk.

Burnett struck out 12 in seven innings and Cody Asche and Carlos Ruiz homered to lead the Philadelphia Phillies to a 3-2 victory over the Washington Nationals on Monday night.

''I just noticed something with my delivery, or the leg kick,'' Burnett said. ''I just noticed something wasn't right. I was like, `That's not me out there. Who is that?' It's the first time I felt like me in a long time.''

Domonic Brown had two hits and an RBI for Philadelphia, which won for the fourth time in five games.

Wilson Ramos and Anthony Rendon homered for National League East-leading Washington, which lost for just the second time in 14 games.

Burnett (7-14) won for the first time since the All-Star break, allowing one run on three hits with just one walk. The right-hander entered leading the majors in walks with 76.

''I wish I could have found that little glitch about a month, two months ago,'' Burnett said. ''Unfortunately it took a long time, but better late than never.''

Tanner Roark (12-8) gave up two runs on five hits in six innings and lost for just the second time in his last nine starts. Roark has a 2.25 ERA over that stretch.

''I felt good, I felt confident,'' Roark said. ''I had command on both sides of the plate. My offspeed was good.''

Burnett retired the first eight batters before Roark's two-out single in the third. It was just the pitcher's sixth hit in 60 at-bats this season.

The Nationals didn't get another hit until Rendon's one-out homer to left in the sixth that pulled them within 2-1. It was the third homer 15 at-bats for Rendon off Burnett.

''If he hits it good, the ball's going to carry,'' Nationals manager Matt Williams said. ''He's been a very pleasant surprise.''

Burnett had been 0-6 with a 7.41 ERA in seven starts since the All-Star break prior to Monday. But he was stellar against Washington, setting a season-high in strikeouts while finishing in double-digits for the 35th time in his career.

''The difference was more strikes on the board early on in the at-bats,'' Phillies manager Ryne Sandberg said.

The Phillies took a 1-0 lead in the fourth on Brown's RBI single and went up 2-0 on Asche's leadoff homer to deep right in the fifth.

''It was a changeup but it didn't change,'' Roark said. ''It was right down the middle, thigh high, and he got me.''

After Washington closed within a run, Ruiz cleared the wall in left off left-hander Jerry Blevins to push Philadelphia's advantage to 3-1.

Ramos homered to right with two outs in the ninth off Jonathan Papelbon, who earned his 32nd save in 34 opportunities.

Ben Revere, who began the day tied for the National League batting lead at .314 with Colorado's Justin Morneau, went 0-for-4 to drop his average to .311.

Chase Utley went 0-for-4, extending his slump to 3-for-29.