NEW YORK --

Thomas McNamara, David Villa and Kwadwo Poku scored second-half goals and New York City FC beat D.C. United 3-1 on Thursday night in their inaugural matchup.

Villa had a go-ahead goal in the 80th minute. After a D.C. United turnover near midfield, Andrea Pirlo chipped the defense and Villa beat two defenders to poke the ball into the back of the net. Poku finished a nice individual effort with a goal in the 88th.

More from FoxSports

New York City (7-11-6) snapped a two-game losing skid, while Eastern Conference-leading D.C. United (13-8-5) had their three-game winning streak stopped.

Alvaro Saborio opened the scoring in the 36th minute for D.C. United. Chris Rolfe intercepted a back-pass at midfield, raced down the left side and fed an open Saborio at the penalty spot. Two minutes later, NYCFC had a two-on-two counterattack, but Villa's close-range shot was blocked off the line by defenseman Bobby Boswell.

McNamara tied the match at 1 in the 51st minute. Villa played a through ball to Poku, who beat goalkeeper Bill Hamid at the top of the 18-yard box and fed McNamara for a redirection.

The goal ended Hamid's 400-minute shutout streak, the longest in the MLS this season.