Goalkeeper Bill Hamid and Brandon McDonald of DC United argue with Dominic Oduro of Chicago. (Tasos Katopodis/GETTY IMAGES)

D.C. United settled for a 1-1 draw with the Chicago Fire in the regular season finale Saturday, but in so many ways, it felt like a triumph.

The outcome, played out on a brisk afternoon in front of an announced sellout at Toyota Park, clinched second place in the Eastern Conference and allowed United to avoid an MLS first-round playoff game Wednesday, a match that probably would’ve faced weather-related complications in Washington. It extended United’s unbeaten streak to seven (5-0-2) since star attacker Dwayne De Rosario was sidelined with a knee injury.

And it capped a remarkable two-year turnaround under Coach Ben Olsen, who took over on an interim basis in late 2010 when United won just six matches and set a league record for scoring futility.

“When you are in the heat of this stuff, it is tough to look back at what you have gone through,” said Olsen, whose squad secured its first postseason berth in five years last week. “It’s more looking forward to the next task.”

The next task promises to rekindle MLS’s oldest rivalry. United (17-10-7, 58 points) will face the third-seeded New York Red Bulls (16-9-9, 57) in the conference semifinals, beginning Saturday or Sunday at Red Bull Arena in Harrison, N.J.

The final leg in the total-goals series will take place Nov. 7 at RFK Stadium.

In its final regular season test, United fell behind in the 16th minute on a goal by former Virginia Tech standout Patrick Nyarko. But after dictating terms for most of the match, D.C. drew even on Lionard Pajoy’s header early in the second half.

United then survived ferocious pressure in stoppage time as Bill Hamid made multiple saves and the Fire (17-11-6, 57 points) squandered several inviting chances.

While United required just a draw to earn a first-round bye, the Fire needed to win to overtake both D.C. and New York for the second slot. The Red Bulls had increased the pressure on both clubs by winning at Philadelphia early in the day, 3-0.

At home and needing to score, Chicago seized the initiative. Nyarko worked a crisp combination with Sherjill MacDonald and, when United’s Marcelo Saragosa challenged him, he cut back into a pocket of space beyond the top of the penalty area. From 25 yards, Nyarko stung a lovely shot into the right side for his fourth goal of the year.

United dodged further trouble four minutes later when Hamid blocked MacDonald’s one-on-one bid deep in the box at the end of a swift counterattack.

United enjoyed most of the possession in the first half but failed to find the target. Pajoy was particularly disappointing in the 41st minute, losing the ball in a clumsy manner after surging past Chicago’s back line.

Five minutes after intermission, Pajoy made amends. As Branko Boskovic crossed from the left, the Colombian striker made a near-post run and bravely lowered his head in front of a defender to redirect it past goalkeeper Sean Johnson. In the process, he took a boot to the forehead.

“We worked all week on crossing and the coach said all the time, ‘Hey, Pajoy, go to the first post, be ready, because Branko will give you a good ball and you can score,’ ” Pajoy said through an interpreter.

Later, Pajoy missed a golden chance to break the tie, chipping the ball horribly off the mark. When his name was raised during Olsen’s postgame interview session, the coach couldn’t help but chuckle a bit.

“He misses chances, he doesn’t get frustrated,” Olsen said, “and he finds a way to get us the goal.”

Hamid preserved the lead with a spectacular save on MacDonald in the 63rd minute. After Dominic Oduro failed to finish MacDonald’s cross in the 76th, Chicago had three chances in the waning moments. MacDonald’s nine-yard stab streaked over the crossbar. Hamid made a diving stop. And on a wild sequence that drew an offside flag from the assistant referee, Oduro back-heeled a shot off the post and United’s Nick DeLeon blocked Jalil Anibaba’s on the goal line.

The final whistle brought relief and celebration.

“Every season has its ups and downs, and you want to be peaking at the end,” midfielder Chris Pontius said. “We’re clicking at the right time.”