ATLANTA — D.C. United played without Wayne Rooney and, for most of Sunday afternoon, without possession of the ball. And until it all fell apart in the dying moments, resulting in a 2-0 defeat to Atlanta United, Coach Ben Olsen’s gang executed a defensive and counterattacking ploy to precision.

D.C. thwarted the defending champions until the 89th minute, when substitute Gonzalo “Pity” Martínez scored from close range, unleashing the pent-up frustration of Mercedes-Benz Stadium’s announced crowd of 44,405.

Josef Martinez, the 2018 MLS MVP, added a breakaway goal two minutes into stoppage time as Atlanta (11-8-3, 36 points) passed D.C. (9-6-8, 35) for second in the Eastern Conference.

“I feel bad for the guys because they put so much into it," Olsen said. "It would’ve been nice to walk away with a point.”

With Rooney sidelined by injury for the first time in his MLS career and D.C. playing a second away match in four days after winning, 4-1, at Cincinnati, one point was the obvious objective. The visitors did have opportunities, namely Paul Arriola’s partial breakaway in the first half, but Atlanta controlled matters and enjoyed 71 percent of possession.

“We always knew it was going to look a little bit like this, but we looked after each other," Olsen said. "They just kept coming and coming and eventually broke us down.”

D.C. was at a personnel deficit. Rooney, the team leader in goals and assists, did not travel to Atlanta because of unspecified minor injuries. He flew to his native England to join his vacationing family and plans to return to Washington by Tuesday.

“It’s just time to give him a mental and physical break," Olsen said. "It’s that simple. It’s not something we want to push right now.”

The only previous match Rooney missed this year was for a red-card suspension. In 20 starts, he played 90 minutes in all but three games. On Thursday, he made his earliest exit, leaving in the 83rd minute after absorbing a hard challenge.

While Rooney was absent, goalkeeper Bill Hamid and central midfielder Luciano Acosta returned. Hamid was benched Thursday for violating a team rule, and Acosta completed a two-game suspension.

Olsen needed to get Acosta back into the lineup but also wanted to retain the formation that had taken hold in the previous 1 1/2 matches. He accomplished both by leaving the structure in place and positioning Acosta in an advanced role similar to Rooney’s.

A 5-foot-3 striker was not going to scare Atlanta, but the skill and quickness of Acosta, Arriola and Lucas Rodríguez offered counterattacking threats.

As expected, Atlanta dominated possession, but D.C. kept its shape and remained disciplined under duress. Hamid made two quality saves on Josef Martinez in the first half.

D.C.’s counterattacks manufactured two excellent opportunities before intermission. In both cases, Acosta’s passes freed Arriola, whose speed led to clean runs on goal. On the first, his cross for Rodríguez racing to the top of the penalty area was a whisker off the mark. On the second, with Arriola on a straight run into the penalty area, Brad Guzan made a splendid foot save.

“If I put one away in the beginning, it changes everything,” Arriola said. “Looking at the replay, if I lift it up a little bit, he has got no chance. In the moment, I look up and see him getting closer, and after running like a mad man, I’ve got to stay in it.”

The theme stayed the same in the second half. “We did a very good job frustrating them for long stretches," Olsen said.

Atlanta was awarded a penalty kick with about 20 minutes left after Russell Canouse fouled Josef Martinez from behind. Questioning the call, Canouse said, “He is already going down, in my opinion.” It did not matter: Martinez sent his spot kick into the heavens.

Three minutes later, Acosta tested Guzan from 25 yards. Olsen added Ulises Segura for fresh energy, and for the purpose of holding the ball upfield, Quincy Amarikwa replaced Acosta.

But with a point in sight, though, D.C. capitulated. Darlington Nagbe beat Júnior Moreno to the end line and crossed into the six-yard box for the onrushing Gonzalo Martínez to nod in from three yards.

“It just comes down to the overwhelming numbers in the box," said defender Steve Birnbaum, who wore the captain’s armband in Rooney’s place.

In stoppage time, Josef Martinez took advantage of D.C. pressing forward. He timed his run to avoid being offside, ran onto Gonzalo Martínez’s pass over the defense and chipped the ball over Hamid for his 16th goal.

“We played well with all they had going on,” Hamid said. "In this environment, I thought we showed our resilience. We were strong defensively; we put out some fires. All in all, a solid performance, but we didn’t get that point.”

Note: Before resuming the MLS schedule Saturday at Chicago, Olsen will use secondary players and call-ups from second-division Loudoun United in a home friendly Wednesday against French club Olympique Marseille.