From a statistical standpoint, D.C. United’s past two matches were a disaster.

Opponents compiled massive advantages in shots (47-14) and possession (66.5 percent), leaving the burdened visitors chasing shadows and pinned in their own end for exhausting stretches.

The only numbers that mattered, though, were on the scoreboard: 3-0 and 1-0, critical victories at Montreal and Portland that extinguished concern about qualifying for the MLS playoffs and reinforced Coach Ben Olsen’s defensive ideals.

The other key figures: Despite the one-sided shot total, the Impact and Timbers managed just four apiece on goal against a unit that blocked shots and forced attempts from outside the penalty area.

“It’s nice to know we can be one of the better defensive teams in the league if we need to be in that structure, which is a little disrespected at times,” Olsen said. “There is an art to defending, and these guys put a lot of work in and made a lot of tactical decisions to solve problems and keep the ball out of the net.”

If United is to make a postseason run, it’s probably not going to go through stylish, attack-geared soccer. It’s going to be by absorbing pressure, bending but not breaking and taking advantage of precious opportunity.

It’s not a pretty form of the sport, one often derided by foes and fans alike. But for United (12-10-9, 45 points), that inelegant style got the job done after three consecutive defeats and kept the team in the hunt for home-field advantage in the first round of the playoffs.

Three regular season matches remain, starting Sunday night at Audi Field against the Seattle Sounders (14-9-8, 50 points).

“Sometimes it’s not about the beautiful soccer,” said defensive midfielder Felipe Martins, whose acquisition last month brought experience and grit. “Everyone wants to play beautiful, but sometimes when you win playing that solidly, it’s more satisfying because we have to work so hard for it.”

United entered the weekend tied for fourth in fewest goals conceded (38) despite facing the second-most shots (538) and fifth-most shots on target (162). Goalkeeper Bill Hamid is second in shutouts (11), and the team goalkeeping is first in save percentage (74.2).

Offensively, with the team struggling to re-create the crackling form it exhibited during the second half of the 2018 season, United has enjoyed more possession just 12 times and is in the bottom six in goals, assists, shots and corner kicks.

Hence, the heightening emphasis on defense.

In a 2-1 victory over the Los Angeles Galaxy last month, D.C. conceded 70 percent of possession while allowing 29 shots. Only four, though, were on goal.

“Everyone wants to talk about possession and how much attack [opponents] have,” Olsen said, “but we got three points.”

With the playoffs approaching, Olsen seems to have settled on his defensive corps after tinkering throughout the year: Hamid in net, with Steve Birnbaum and Frédéric Brillant at center back, flanked by Joseph Mora and Russell Canouse, a traditional midfielder who, on short notice, has been converted into a right back.

Martins and Júnior Moreno form the defensive-midfield partnership. The other midfielders — Paul Arriola, Lucas Rodríguez and Ulises Segura — have been given greater defensive responsibility, such as tracking back and disrupting forays.

With few opportunities to exhale, United has been tested mentally.

“It is hard, especially for our back line,” Birnbaum said. “We’ve done a good job being tuned in and covering each other’s backs. There’s no excuses that guys should be turning off at all in these games. The coaching staff prepared us in the right way to be able to stay focused throughout those 90 minutes.”

In the wake of two shutouts, though, “can we push the offensive side a little bit and find that balance?” Olsen asked. “That’s the challenge we face.”

Leading scorer Wayne Rooney is trying to regain his form after missing several matches for various reasons; he has scored once since July 1, a span of eight appearances. Playmaker Luciano Acosta lost his starting job amid low production and Olsen’s defensive demands from all players.

Last weekend, the difference against Portland was a first-half own goal.

United’s defensive expertise will make it a difficult team to oust from the playoffs, which, with a format change, has been reduced to single matches in every round. A stout defensive effort over 90 minutes — or, if necessary, 120 — could contribute to more upsets.

“We have done that many times this season,” Rooney said of succeeding with a defense-first tactic. “We’ve seen we can do it and get the rewards for it. It’s obviously not how everyone wants to play, but if you know you have to do that to get through a game, then we are ready to go.”

Seattle Sounders at D.C. United

When: 8 p.m. Sunday.

Where: Audi Field.

Records: United 12-10-9, 45 points; Sounders 14-9-8, 50 points.

Live streams: FloFC and ESPN+. Both are pay services. ESPN+ is subject to blackout.

D.C. probable starters: GK Bill Hamid; D Russell Canouse, Frédéric Brillant, Steve Birnbaum, Joseph Mora; MF Ulises Segura, Felipe Martins, Júnior Moreno, Paul Arriola, Lucas Rodríguez; F Wayne Rooney.

Seattle probable starters: GK Stefan Frei; D Kelvin Leerdam, Kim Kee-hee, Gustav Svensson, Nouhou; MF Cristian Roldan, Jordy Delem, Nicolás Lodeiro, Víctor Rodríguez, Jordan Morris; F Raúl Ruidíaz.

Read more: