SAN DIEGO (AP) — Ian Kennedy was close to perfect through four innings, holding the Washington Nationals without a hit and getting a double play to erase the only baserunner.

He ran into trouble in the fifth and then faltered in the sixth.

Stephen Strasburg rebounded from a rough start to beat his hometown San Diego Padres for the fourth straight time, and Bryce Harper and Danny Espinosa hit three-run homers to power Washington to a 10-5 victory Sunday.

The Nationals won the final three of the four-game series and for the 15th time in 19 games.

The Padres were left frustrated again. They've scored only six runs in the last three games. On Sunday, Justin Upton homered twice for the Padres, raising his season total to 10, and Jedd Gyorko hit his second.

Harper tripled into the right-field corner leading off the fifth for Washington's first hit and Ryan Zimmerman followed with an infield single to third. Kennedy retired Tyler Moore and Jose Lobaton before Espinosa drove an 0-1 pitch an estimated 383 feet into the Jack Daniel's party deck atop the right-field wall for a 3-2 lead.

Kennedy walked the bases loaded opening the sixth. Lefty Frank Garces came on to face Harper, who hit a nubber down the third-base line for an RBI infield single. Zimmerman hit a sacrifice fly and Moore hit a two-run double for a 7-2 lead.

"I almost pitched out of it," Kennedy said. "I was one out away, one pitch away, from closing the fifth inning out, and it was a big blow but I was trying to go out and throw the sixth inning and missed them by a little bit, off on fastballs. It's pretty frustrating because it was such a good start. I thought it was going to be another good day."

Kennedy allowed six runs, three hits and four walks in five innings. He struck out six.

"It looks as though in the sixth he lost his release point," manager Bud Black said. "He just couldn't find the range on any of his pitches. At times that can get to a pitcher, you know, when you're trying to throw strikes and you can't. That's always a tough one. It just looked as though his mechanics were off a little bit.

Harper went 3 for 3 with a walk and four RBIs. His NL-leading 14th homer was an opposite-field shot to left off reliever Dale Thayer with one out in the seventh. Harper also had an infield RBI single and a triple. Needing a double for the cycle, he grounded to first, ending the ninth.

Strasburg (3-4), who went to West Hills High in suburban Santee and pitched for Tony Gwynn at San Diego State, improved to 4-1 against the Padres, including 2-0 at Petco Park.

He was coming off a start he called embarrassing, when he allowed career-high eight runs in only 3 1-3 innings in a 14-6 loss at Arizona. In his outing before that, he left early because of a tight back and later visited a chiropractor.

Given a 7-2 lead, Strasburg pitched into the sixth for the first time in three starts. He allowed three runs and five hits in five-plus innings, struck out seven and walked one. He was chased after allowing a double and single opening the sixth.

Strasburg fell behind 2-0 after allowing Matt Kemp's RBI infield hit in the first and Upton's home run to left with two outs in the third. Upton hit another solo shot in the eighth, off Tanner Roark.

TRAINER'S ROOM

Nationals: OF Jayson Werth missed his second straight game after getting hit on the left wrist by a pitch Friday night.

UP NEXT

Nationals: Washington is off Monday before opening a two-game series against the New York Yankees on Tuesday night, when LHP Gio Gonzalez (3-2, 4.25 ERA) is scheduled to oppose RHP Nathan Eovaldi (3-1, 4.14).

Padres: San Diego is off Monday before welcoming Kris Bryant and the Chicago Cubs on Tuesday night for the opener of a three-game series. Bryant starred at the University of San Diego. The scheduled starters are RHP Jason Hammel (3-1, 3.11) for the Cubs and RHP James Shields (5-0, 3.91) for the Padres.