United's Chris Pontius scores a first-half goal against Fire goalie Jon Busch. (John McDonnell/The Washington Post)

In a tangled race for MLS playoff seeds, D.C. United will not know the opponent, round or even the date of its postseason opener until all five simultaneously played Eastern Conference matches end next weekend.

But after a 4-0 romp over the Chicago Fire on Sunday, United is sure of one thing: It is back on track after weeks of gloom threatened to derail an otherwise bright campaign.

United (15-12-6) has won two in a row since a six-game winless rut and, although neither foe will qualify for the playoffs, both performances were a timely tonic.

“Things went our way, but the energy and focus and attitude is a good one,” Coach Ben Olsen said after the most lopsided result of the season. “We are heading in the right direction.”

United (51 points) regained second place behind the New York Red Bulls (57), who clinched the top slot Sunday with a 4-1 victory over Philadelphia. A victory next Sunday at third-place Columbus (50 points) would allow D.C. to avoid a first-round match in the middle of next week and allow it to prepare for the start of the two-leg conference semifinals Nov. 1. A draw against the Crew also might be enough.

United cannot finish any lower than fourth place; the third- and fourth-place finishers will host first-round matches against the No. 5 and 6 seeds, respectively.

For United, regaining rhythm has been as important as the results.

“It’s about getting the product right on the field” going into the playoffs, captain Bobby Boswell said. “If we continue to play the way we did tonight, we’ll be a very tough team to play.

“That is what everyone fears in the playoffs: You don’t want to play a team that’s hot and you definitely don’t want to play a team that can find a way to win no matter what happens. If we get a result at Columbus, we’ll be both of those.”

To that end, United enjoyed its second highest output of the season and recorded its first shutout in league play since Aug. 8. Chris Pontius shattered a sleepy first half by scoring in the 39th minute, and United’s persistence in the second half was rewarded with three goals in rapid succession before 20,104 at RFK Stadium .

Boswell headed in a corner kick in the 67th minute, Fabian Espindola scored on a redirected shot in the 71st and Alvaro Saborio connected from close range in the 80th to smash the last-place Fire (8-19-6), which finished winless on the road (0-12-5).

“The first half could have gone either way,” Olsen said. “Second half, I just thought we were a different team.”

Before it reached that point, Pontius altered the trajectory with his first goal in almost five months. On a ball that Chicago had touched from United’s Chris Rolfe, Pontius pounced before the Fire defenders could react. He surged into the penalty area and stayed with the ball after another Chicago touch.

“If I had any angle, I was going to shoot it,” he said. “If not, I was going to let it roll out for a corner kick.”

Despite the acute angle from near the end line, Pontius turned his body and hit the target.

Plagued by injuries for the third straight season, Pontius was the most influential player in the previous match, a 2-1 comeback victory over New York City FC.

“It’s been a long year” for Pontius, Olsen said. “It always seems to be a long year for Chris, and he finds his way through it.”

After Chicago’s late-half threats were quelled by goalkeeper Bill Hamid, United seized control. The margin remained stuck until midway through the second half, when Boswell shook free on Espindola’s corner kick and turned a near-side header from eight yards into the far corner.

Four minutes later, Espindola attempted to drive a low ball on target or into the six-yard box. As goalkeeper Jon Busch committed to the far side, defender Lovel Palmer’s deflection sent the ball angling into the near corner.

The caroms continued to go United’s way. Four minutes after entering for Rolfe, Saborio stabbed a deflection from close quarters for his fourth strike in 11 matches since arriving from Real Salt Lake.

“With the 1-0 lead, we wanted to put them away,” left back Taylor Kemp said. “We haven’t done that much this year. We really wanted to push. It feels good to score some goals. We haven’t really done that too frequently.”