Amobi Okugo, left, and Sheanon Williams, right, of Philadelphia battle for the ball with United’s Dwayne De Rosario. (Drew Hallowell/GETTY IMAGES)

D.C. United is a quality team, one that fields exciting young players and an MLS most valuable player candidate. But the lack of consistency continues to undermine its postseason ambitions, and with a 3-2 loss to the Philadelphia Union on Thursday night, United remains on an uncertain course.

In a match that crackled with energy, tension, a wealth of scoring chances and tidy finishing, United overcame a two-goal deficit before surrendering Michael Farfan’s goal early in the second half and once again failing to forge consecutive victories this season.

The defeat kept United (9-9-11, 38 points) on the outside edge of the playoff race with five matches remaining.

Dwayne De Rosario had his league-best 14th goal and Andy Najar scored the equalizer on a dashing sequence, but after Farfan’s go-ahead strike for the Union (10-7-13, 43 points), United wasn’t able to recover.

United Coach Ben Olsen maintained the same starting lineup that thrashed Real Salt Lake on Saturday, the first time he has refrained from making changes since consecutive matches against Philadelphia and New York in early July.

United, however, was without forward Charlie Davies, who remained in Washington with a stomach virus. Davies, tied for fourth in MLS with 11 goals, is expected to be available Sunday at Columbus (11-12-8, 41 points).

United’s most pressing issue against the Union was the defensive effort, which was a step behind and sprung early leaks. Philadelphia needed just four minutes to exploit the negligence.

In marking Veljko Paunovic, Ethan White had his back turned on Carlos Valdes’s long ball, which struck him in the shoulder and conveniently dropped into Sebastien Le Toux’s path for a low one-timer from 12 yards past Bill Hamid. The fourth-minute goal was the quickest conceded by United this season.

United’s backline issues persisted. In the 15th minute, Farfan served a left-side cross over Brandon McDonald to Le Toux, who chested the ball down, touched it into the box and stabbed a thigh-high bid past the advancing Hamid. While Le Toux danced, Hamid hopped and waved his arms in disgust.

After enduring another threat, United answered seven minutes later. On Austin da Luz’s corner kick, De Rosario made a run across the face of the target toward the service, twisted in mid-air and neatly angled a six-yard yarder past rookie goalkeeper Zac MacMath for his fifth goal in three matches.

The match continued at a furious pace, and in the 30th minute, United pulled even on a sensational 60-yard run by Najar. Surging out of his end, the Honduran teenager breezed into open space, stutter-stepped past Michael Farfan and, an instant before twin brother Gabriel Farfan could close him down, fired a 15-yard rocket into the near side for his fifth goal of the year.

Without touching the ball, De Rosario played a part in the sequence, serving as a decoy to distract two defenders. De Rosario was in an offside position, and Najar wisely took the initiative instead of passing.

The Union kept Hamid busy the remainder of the half and United continued to enjoy attacking freedom. The blazing tempo gave way to tighter defensive efforts after intermission, but in the 57th minute, Philadelphia reclaimed the lead.

Michael Farfan leaped over McDonald’s slide tackle and found a gaping pocket of space to blister a 23-yard, left-footed drive into the left side.

De Rosario exited in the 62nd minute with a leg contusion, yielding to Santino Quaranta. Two minutes later, Najar should have done better with a back-post header set up by Josh Wolff, missing wide from 10 yards.

Olsen added firepower by replacing da Luz with rookie forward Blake Brettschneider. United pressed for an equalizer, whipping dangerous crosses into the box and earning two corner kicks, but failed to serious test MacMath.

United notes: Freddy Adu, who began his pro career with United in 2004 at age 14 and was facing D.C. for the first time, entered early in the second half. . . . McDonald will miss Sunday’s match after exceeding the season’s yellow card limit.