In the eighth inning of a tie game at Citi Field on Friday night, the crowd of 38,495 broke into an enthusiastic, whole-stadium version of the wave.

Round and round it went as Daniel Murphy batted with a man on first. A tense situation seemed instead like a walk in the park for those Mets fans, who probably assumed that their first-place club was going to find a way to beat the Pirates the way they did four times against the Rockies this week.

But the Pirates are not the Rockies. The Pirates are one of the best teams in baseball, and it was Pittsburgh that pulled out a 3-2, 10-inning win over the Mets.

The Pirates scored twice in the 10th to pin the loss on Bobby Parnell (1-2), the struggling former closer.

Parnell faced three batters and allowed singles to them all. The third, by Gregory Polanco, gave the Pirates a 2-1 lead. Pittsburgh added another run on a sacrifice fly by Aramis Ramirez off Carlos Torres.

The Mets, who had won four straight, made it 3-2 in the bottom of the 10th when Curtis Granderson's sacrifice fly scored Juan Lagares, who had led off the inning with a double against Mark Melancon.

Melancon (36 saves) has converted 34 in a row. The Mets were 0-for-7 with the sacrifice fly with runners in scoring position.

The Mets began the day with a 41/2-game lead over Washington in the NL East. The Nationals played a late game in San Francisco. The Pirates came in with the second-best record in the National League and third-best in baseball (now 67-46). They were six games behind St. Louis in the Central, though, and are locked in a three-teams-for-two-spots wild-card race with the Cubs and Giants.

Pittsburgh swept the Mets in a three-game series in their only previous meeting in May at PNC Park. The Mets are a different team now, with the pitching staff firing zeros and enough depth in the lineup to withstand the continued absence of Lucas Duda, who missed his fourth straight game with a lumbar strain.

The Pirates struck first off Bartolo Colon when Neil Walker, the second batter of the game, hit a solo homer.

The Pirates started lefthander J.A. Happ, who kept the Mets off the board until Yoenis Cespedes (3-for-5) tied it at 1 with his second home run as a Met in the sixth. It was Cespedes' 20th home run overall.

The Mets had chances. Cespedes doubled with two outs in the first, but Juan Uribe struck out. The Mets had two singles and a walk in the second, but did not score.

Lagares led off the third with a single and went to third on Granderson's double into the rightfield corner. The stadium came alive with chants of "Let's go, Mets," but Happ struck out Cespedes, got Uribe to pop to second and struck out Murphy.

After Cespedes' homer, Murphy doubled with one out in the sixth. Righthander Jared Hughes replaced Happ and got Michael Cuddyer to ground to short and Wilmer Flores to pop to first to make the Mets 0-for-7 with runners in scoring position.

Colon was stingy with the runs, too. The Pirates had runners at the corners with one out in the fourth when Colon got Pedro Alvarez to ground into an inning-ending, 1-6-3 double play.

It was Pittsburgh's only at-bat with a runner in scoring position against Colon, who went seven and allowed one run and five hits. He walked two -- Andrew McCutchen both times -- and struck out seven.