WASHINGTON (AP) — Luciano Acosta completed a hat trick in the 96th minute to give D.C. United a 3-2 victory over 10-man Orlando City on Sunday night.

Wayne Rooney set up the winner by chasing down and tackling Orlando’s Will Johnson, who was crossing midfield and racing toward an empty net after D.C. brought its goalkeeper up for a corner. Rooney then turned the other way and sent a long ball to Acosta, who headed it home to put United (5-9-6) in front.

Dom Dwyer tied it in the 71st minute, getting behind the central defense on Oriol Rosell’s through ball and chipping it over the goalkeeper to tie it at 2 for Orlando (7-15-2).

Orlando’s Cristian Higuita was sent off for a high arm swing making contact with Yamil Asad in the 55th minute.

Acosta’s second made it 2-1 in the 64th minute. He finished Asad’s cross from close range and collided with the goalkeeper shortly after the shot. The goal was upheld after video review confirmed that Acosta was onside.

Acosta opened the scoring in the fourth minute of first-half stoppage time with a give-and-go to Rooney and a rocket to finish from a narrow angle.

Rosell sent a cross along the end line that D.C. goalkeeper David Ousted inadvertently deflected into his own goal in the 50th minute, making it 1-all for Orlando.

NEW YORK CITY FC 3, TORONTO FC 2

TORONTO (AP) — Ismael Tajouri-Shradi scored his second goal of the game in the 88th minute to lift New York City FC past Toronto FC.

The New York City attacker drove a left-footed volley past diving goalkeeper Alex Bono’s for his 10th goal of the season. David Villa also scored for New York City (14-5-5).

Sebastian Giovinco and Victor Vazquez scored for Toronto (6-12-5). The defending MLS Cup champions lost Jozy Altidore to a red card 11 minutes into the match. He was sent off for kicking New York defender Alexander Callens, leaving the striker facing at least a one-match ban for next weekend’s trip to San Jose. The loss ended Toronto’s all-competitions unbeaten streak at six.