As Wayne Rooney looks on, Bradley Wright-Phillips scores the first of his three goals at Audi Field. (Brad Mills/USA TODAY Sports)

It will go into the 2018 archives as a draw, one point during a late-season dash for an MLS playoff berth and a compelling standoff against a sworn enemy far ahead in the Eastern Conference standings.

But D.C. United‘s nutty, manic, jaw-dropping, agonizing 3-3 tie with the New York Red Bulls on Sunday felt like a crushing defeat at a time when the resurgent hosts could barely afford a misstep at Buzzard Point.

Three times, United went ahead. Three times, the Red Bulls — and more specifically, Bradley Wright-Phillips — answered.

The last came in the 90th minute, three minutes after Luciano Acosta had shattered the deadlock. It was a gut-punch of a volley that deflated D.C. and silenced — except for the delirious visiting supporters — the 18,331 at Audi Field.

“Any time you get three goals at home,” United Coach Ben Olsen said, “you should walk away with three points.”

Instead, United (9-11-8, 35 points) made only small progress in pursuit of the fifth-place Philadelphia Union (40 points) and the sixth-place Montreal Impact (39) for one of the last two playoff slots. D.C. (6-2-3 in the past 11 outings) has played the same number of games as Philadelphia and one fewer than Montreal and, with the next five at home, United remains well-positioned. New England (34 points) is also in the mix.

United’s next game, Sept. 29, is against the Impact.

The margin of error is narrowing, and defensive errors — namely, in tracking Wright-Phillips — cost United two points Sunday. The English striker, who in his previous visit to Washington recorded his 100th career goal in MLS, struck 16 minutes after Paul Arriola, 12 minutes after Wayne Rooney and, finally, those 180 seconds after Acosta’s gem.

Alex Muyl crossed from the left. Steve Birnbaum lost track of Wright-Phillips for an instant, which was enough time to drive a left-footed bullet from seven yards between the near post and goalkeeper Bill Hamid for his 19th goal of the year. He has 10 goals in 15 all-time games against D.C.

United earned one of a possible nine points against the second-place Red Bulls (17-7-5, 56 points) in the season series, and is winless in the past eight meetings (4-0-4) and 1-8-5 in the past 14 regular season clashes.

“There’s lots of things that could’ve gone differently, but still we had chances to finish out the game,” midfielder Russell Canouse said. “It’s really disappointing.”

For all the disappointment, there was acknowledgment of an extraordinary match. Rooney called it a “great advertisement” for MLS.

All six goals came on quality finishes, including an overhead kick by Wright-Phillips, one-timers by Arriola and Rooney, and a clever move by Acosta. Rooney hit the crossbar when United was ahead 2-1, and failed to complete a breakaway at 2-2. Birnbaum hit the left post in second-half stoppage time.

Because of injuries and other delays, there were 11 additional minutes.

“We’re on the verge of a playoff spot,” Rooney said. “Today was a little bit of a setback.”

United went ahead in the 25th minute. Acosta stripped the ball from Tim Parker and brushed off challenges before threading a wonderful diagonal ball to Arriola for a 17-yarder to the far corner.

Hamid was at the center of things before halftime arrived. In the 32nd minute, he made a reflex save on Marc Rzatkowski at close range. Nine minutes later, however, he misplayed Parker’s header winding through traffic. The ball airborne, Wright-Phillips turned his back to the target and executed a leaping, right-footed overhead kick that beat Hamid from five yards.

United regained the lead in the 64th when substitute Oniel Fisher crossed to Rooney. Given the origin of the pass and Rooney’s positioning, he figured to drive a left-footed shot into the right corner. Instead, he volleyed into the left side, a difficult act made to look easy for his fifth goal in 14 appearances since arriving in July.

Wright-Phillips tied it in the 76th, gathering Michael Murillo’s cross and placing an 18-yarder into the near corner. With D.C. defender Frederic Brillant hurt near the center circle, United complained that play should’ve been stopped.

Acosta launched Rooney on a breakaway in the 80th, but Luis Robles intervened to make a terrific one-on-one save.

Another go-ahead goal — and seemingly the winning goal — came in the 87th. Acosta played a give-and-go with Yamil Asad and turned the corner. Anticipating a cross to Rooney, defender Aaron Long stepped out, leaving a pathway for Acosta to bear down on Robles and lift the ball over the goalkeeper.

Wright-Phillips then spoiled the afternoon.

“We were good on the night and deserved more out of the game,” Olsen said, “but that doesn’t do anything for us right now.”

United notes: Asad returned from a four-game injury layoff, replacing Ulises Segura in the 63rd minute. … Brillant made his first start since late July, replacing injured Kofi Opare. … With reserves and perhaps guest players from the second-division Richmond Kickers, United will host Honduran club Olimpia in a friendly Wednesday.

Read more soccer coverage from The Post:

Young, untried U.S. men’s national team stares down Mexico in contentious friendly

When will USMNT hire a coach? 

For D.C. United, path to MLS playoffs goes through a seven-match, 49-day homestand