PHILADELPHIA — Trea Turner, Nick Castellanos and J.T. Realmuto hit two-run homers, leading the Philadelphia Phillies to a 6-2 win over the Washington Nationals on Thursday night.

The Phillies took three of the four games in the series from the Nationals, including Michael Lorenzen’s no-hitter on Wednesday night. Philadelphia moved 1 1/2 games ahead of idle San Francisco for the top spot in the NL wild-card race.

Philadelphia (64-52) improved to a season-best 12 games over .500. The Phillies are 39-22 since June 1, a win total matched only by NL East-leading Atlanta, which is 39-19 in that stretch.

The only sour note in Thursday’s victory for the Phillies was slugger Bryce Harper leaving the game in the top of the fifth inning with what the club called mid-back spasms. He was undergoing evaluation, the team said.

The Baltimore Banner thanks its sponsors. Become one.

After struggling for most of Thursday to cash in on seven walks by Nationals starter Patrick Corbin, the Phillies finally broke through in the sixth when Turner hit his 12th homer of the season into the left-center-field bleachers off reliever Andres Machado to give Philadelphia a 2-1 lead.

Turner, a career .295 hitter with an .823 on-base/slugging percentage (OPS) during his first eight years in the majors, entered the homestand with a .235 average and a .657 OPS in the first year of his 11-year, $300 million free agent contract.

Instead of boos, Turner was greeted by standing ovations from the notoriously impatient Philadelphia fan base and has immediately responded with his best stretch of the season. In his last seven games since returning to Philadelphia, Turner is hitting .370 with four doubles, two homers and eight RBIs.

Castellanos followed in the seventh inning with a two-run homer off Joe La Sorsa, his 20th long ball of the season and third in two games. Three hitters later, Realmuto hit his 14th homer of the year to add to the lead. Realmuto had two hits.

Aaron Nola went five innings and allowed no runs but didn’t figure in the decision. Matt Strahm (8-3) picked up the victory for the Phillies.

CJ Abrams, Joey Meneses, Keibert Ruiz and Ildemaro Vargas each had two hits for Washington (50-65). Vargas knocked in both Washington runs with two doubles.