As the final whistle sounded Wednesday, D.C. United goalkeeper Bill Hamid punted the ball into the night — a release of emotion and relief shared by his spent teammates and a skittish crowd at Audi Field.

After scoring early, United lived both dangerously and heroically, its MLS playoff outlook hinging on each brilliant save by Hamid and a collective performance under late duress that yielded a 1-0 victory over the New York Red Bulls.

With two matches left, United (13-14-5) is back above the Eastern Conference’s seven-team threshold but just by a thread. It’s a point ahead of the Red Bulls and Montreal, but both have played one fewer match.

Saturday’s opponent, the visiting Columbus Crew, trails United by three points. Looking in the other direction, D.C. is three points out of fourth place.

“We have faith. We have belief,” Hamid said. “We’re going to lay it all out on the line.”

Four days after the worst defeat in United’s 25-year history, a 6-0 embarrassment at New York City FC, 18-year-old Kevin Paredes scored before leaving with an injury and Hamid made four terrific saves in posting his eighth shutout.

Before an announced crowd of 14,109, United snapped a four-game winless streak — it conceded nine goals in the past two matches — and ended both the Red Bulls’ four-game winning streak and eight-match unbeaten run.

United also clinched the Atlantic Cup — the annual series between MLS originals — for the first time since 2016. In two previous meetings this season, United won at home and drew on the road.

“It’s incredible everything what they are doing,” Coach Hernán Losada said of his shorthanded team. “At the start of the season, the odds were completely different, so we’ve been bouncing back every single game since the start. Let’s try to bounce back two more times.”

After going ahead early, United used grit and composure to ward off the Red Bulls (12-12-7), who had large advantages in possession (60-40), shots (17-4) and corner kicks (11-4).

“Probably not the nicest game to watch, but you know [what] we have to do,” Losada said.

With the return of Paul Arriola and Andy Najar, two of United’s most important players, Losada fielded a fairly strong lineup, though neither was at full strength and both left early. He was still missing attackers Edison Flores and Yordy Reyna, but Arriola provided flank weaponry and high energy while Najar elevated the ability to attack out of the back.

As recently as Tuesday night, the pair was listed as “out” on the team’s injury report with groin (Arriola) and hamstring (Najar) ailments.

Both players were important at the start, injecting fizz into an urgent cause. Najar was clever in possession and Arriola raided the right wing. He also flapped his arms at the crowd, urging them to help the effort vocally.

United went ahead in the ninth minute on Paredes’s third goal of the season.

Julian Gressel launched a long ball to Nigel Robertha, who had a step on defender Sean Nealis. Robertha’s cross was behind charging Ola Kamara deep in the penalty area, but Paredes was unmarked on the back side for a rising one-timer from six yards.

Hamid preserved the lead with three first-half gems: a leg save on Cristian Casseres Jr.’s angled shot, a touch save on Tom Edwards’s high bid and a foot block on Fábio’s strike.

United’s good fortune took a hit in the 38th minute when Paredes departed with an apparent groin ailment, the latest in a season stuffed with injuries throughout the roster. Joseph Mora entered.

The severity of the injury was not immediately known, but given the issue, Paredes’s chances of playing against Columbus and then at Toronto FC on Nov. 7 seemed doubtful.

Having not played since Oct. 10 — and with another key match Saturday — Arriola left at intermission. Najar was done in the 64th minute.

New York’s chances kept coming. Patryk Klimala squandered a partial breakaway, and Hamid made a superb save on Andrew Gutman before swatting away a bending corner kick headed for the net.

Between injuries and exhaustion, does United have enough left to earn a playoff berth?

“It’s a good question,” Losada said. “We’re going to find out on Saturday. I hope so, but the circumstances are very hard and difficult. … We’re going to have to make it with what we have and go for it.”

Notes: Former D.C. star Luciano Acosta met performance thresholds with FC Cincinnati, people close to the matter said, triggering an additional $225,000 in general allocation money for United from last winter’s trade. Overall, D.C. collected $550,000 for Acosta’s MLS rights. …

Defender Brendan Hines-Ike (hip) made his first appearance since July 3, entering in the 77th minute. Defender Frédéric Brillant (ankle) is out indefinitely and midfielder Moses Nyeman is recovering from a quadriceps injury.