Forward Chris Pontius, middle, of D.C. United scores his second of three goals in a win over New York. (Patrick Smith/GETTY IMAGES)

With a cold rain pelting RFK Stadium on Sunday, D.C. United’s match against the New York Red Bulls threatened to become a dodgy affair decided by missteps and misfortunes.

Instead, United navigated the field — and its bumbling opponent — as if it were performing in unspoiled conditions.

Chris Pontius, in his second straight start since earning his way back into the lineup, recorded his first career hat trick, and the club’s attack regained its stride after a midweek shortfall to slam the short-handed Red Bulls, 4-1, before 13,262 joyfully drenched spectators.

United (3-2-3, 12 points) is unbeaten in six straight since losing its first two matches.

“Throughout the season, you are going to have games like this, where you are playing a team that is down and you have to step on it and take advantage of it,” Coach Ben Olsen said. “We did a very good job from start to finish putting them under a lot of pressure and not letting them get comfortable.”

Rookie Nick DeLeon also scored for United, which struck three times in a 28-minute stretch of the opening half and avenged a 4-0 home loss to the Red Bulls last spring.

Pontius scored from distance in the eighth minute, from close range in the 32nd and on a confident run in the 69th as United overtook the Red Bulls (3-3-1, 10 points) for second place in MLS’s Eastern Conference.

Pontius began the season as a starter but, after two lackluster efforts, landed on the bench.

The demotion tested his patience, but after scoring a late, go-ahead goal three minutes after entering a match at New England, he reclaimed his lead role.

“As much as I was frustrated,” he said, “I went into practice every day and put my head down and worked hard.”

In each of his three recent appearances, Pontius has served on the front line — a departure from his usual place on the left wing.

“He still doesn’t know how to play forward — that’s the scary thing,” Olsen said. “He’s still new at the position, and some of the movements can get a lot better, but three goals isn’t too bad.”

Pontius’s teammates praised him for retaining his focus.

“Through the ups and downs, he has maintained his mental composure,” right back Robbie Russell said. “He came out and performed brilliantly today.”

In the eighth minute, Pontius swiped the ball from Thierry Henry near the center circle and embarked on an ambitious run. Veering to the right, he unleashed a searing, 22-yard drive over leaping goalkeeper Ryan Meara.

United was unrelenting. In the 32nd minute, using his upper-body strength and nimble footwork, Maicon Santos toyed with three defenders before crossing into the six-yard box.

Meara slapped the ball down, but off defender Connor Lade’s leg, allowing Pontius to finish into an open net.

Four minutes later, Victor Palsson’s misplay sent the ball spinning deep into the box. Dwayne De Rosario nudged Lade off the ball and crossed back to DeLeon for a 14-yard bid that caromed off Markus Holgersson and past the committed Meara.

Pontius capped the hat trick in the second half, evading Holgersson’s desperate reach to maintain his run and tucking the ball under Meara. Henry shattered Joe Willis’s shutout bid in the 72nd minute with a magnificent free kick from 25 yards, his eighth goal of the year. The Red Bulls, MLS’s top-scoring team with 16 goals in the first six matches, were without five regulars because of injury and suspension.

“We’re not trying to get ahead of ourselves — that’s what is making us successful right now,” United midfielder Danny Cruz said. “But if we keep doing what we’re doing every single week, I think we’re definitely going in the right direction.”