Blake Brettschneider, who moments earlier thought he had given United a 2-1 lead in the 89th minute before an offside call nullified the goal, realizes his and D.C.’s postseason aspirations have been extinguished. (Jonathan Newton/The Washington Post)

D.C. United thought it had extended its season, celebrating all over the soggy field and around the bench after Blake Brettschneider headed the ball into the net in the 89th minute of a deadlocked match with the Portland Timbers on Wednesday night.

No one, however, noticed the referee assistant’s raised flag: offside.

United had four additional opportunities during the dizzying finish, each one falling maddeningly short of the target. The 1-1 draw before 14,317 at RFK Stadium extinguished United’s MLS playoff hopes with one match remaining.

“I thought that was it. I thought we got it, now let’s finish up this game and move on,” Brettschneider said.

Initially, there didn’t seem to be reason for the goal to be nullified. However, goalkeeper Troy Perkins had strayed well off his line in an attempt to break up the initial play. So when Dwayne De Rosario crossed to Brettschneider, only one defender stood between him and the net.

United continued to push for the game-winner. De Rosario’s shot toward an open net appeared to carom off the arm of sliding defender Eric Brunner. Referee Jair Marrufo ignored United’s claim for a handball. Brettschneider’s header flew narrowly wide and Perkins, a former D.C. keeper, made consecutive reaction saves.

Despite the inspiring effort, United will miss the playoffs for a club-record fourth consecutive year and seventh time since winning the 1999 title.

“They’re absolutely dead in there,” Coach Ben Olsen said, referring to his players in the locker room. “That’s the way you want to go down — every guy basically not being able to walk after the game. I’m proud of that fact.”

The Timbers (11-14-8) went ahead midway through the first half on Kenny Cooper’s header, but De Rosario, MLS’s leading scorer with 16 goals, equalized in the 73rd minute for United (9-12-12), whose playoff hopes hinged on winning its final two games and New York losing Thursday.

The last 15 minutes were a spectacle, with both teams surging end to end in search of a badly needed victory.

“It felt like a schoolyard game,” United midfielder Santino Quaranta said. “Every time we got the ball going forward I felt like it was going to be a chance to score.”

In a short span, Perkins performed like both the best goalkeeper in the league and the worst. He and his counterpart, Bill Hamid, made sensational saves, but Perkins’s strolls off the goal line opened opportunities for United. Nothing, however, would go in.

“We might’ve played for another 10, 15 minutes and still both teams probably wouldn’t have scored,” United captain Josh Wolff said. “It’s a bizarre ending.”

In the 82nd minute, United begged for a penalty kick when De Rosario went down in the box. With United pressed forward and exposed in the back, it was Portland’s turn. Brian Umony hit the crossbar from four yards and saw Hamid thwart his one-on-one bid.

In the 89th, Perkins was caught out of position, allowing De Rosario to set up Brettschneider for the disallowed goal. In added time, after De Rosario touched the ball past the advancing Perkins, Brunner slid to impede a shot that appeared to strike his upper arm.

Later, steps from the net, Joseph Ngwenya didn’t react quickly enough to De Rosario’s cross, allowing Brunner to slide in from behind and knock the ball toward Perkins, who prevented an own goal. Perkins then recovered to thwart Brettschneider’s bid on the rebound.

“Some of the saves he pulled off there at the end, we were just sitting there scratching our heads thinking, ‘How’d that not go in?’ ” Brettschneider said.

United was to blame for falling behind in the 24th minute. Brandon McDonald’s soft marking freed Cooper to nod Rodney Wallace’s high ball past Hamid for his eighth goal of the season.

De Rosario, playing with a shin injury that nearly sidelined him at halftime, tied it with a clinical turn and tightly angled shot that beat Perkins to the upper near side — yet another sensational strike by the MVP candidate. It was his 13th goal in 17 appearances since joining United in late June and broke a tie for the league scoring lead with San Jose’s Chris Wondolowski.

The teams then exchanged a wealth of sterling opportunities.

“I can’t believe nobody scored down that stretch,” Olsen said. “The amount of chances going end to end were pretty remarkable. It just wasn’t our night.”