Stephen King (20) D.C. United celebrates his goal in his team’s 4-0 victory over Vancouver at RFK Stadium. (Ned Dishman/GETTY IMAGES)

The last time D.C. United had won at RFK Stadium, Dwayne De Rosario was playing for the New York Red Bulls, Chris Pontius was just beginning to find his form and Joe Willis was inactive on most game days.

More than three months had passed since United last celebrated at home, but on Saturday night, with De Rosario continuing his torrid stretch, Pontius scoring twice and Willis making his MLS debut in fine fashion, D.C. routed the Vancouver Whitecaps, 4-0, in front of 11,738 relieved observers.

The victory lifted United (7-6-9) to within a point of third place in the Eastern Conference — the top three will receive automatic playoff berths — and ended a 0-2-5 rut in Washington.

“We’ve been knocking on the door for a performance like that for a little while now, and to put it all together is a good feeling,” said assistant coach Chad Ashton, who filled in for the suspended Ben Olsen. “Hopefully, we can realize the things we did well and then use those things going forward.”

De Rosario (two assists) set up Pontius’s first goal just before halftime and Vancouver goalkeeper Jay Nolly’s howler resulted in Andy Najar’s goal early in the second half. Pontius and substitute Stephen King added goals against the league-worst Whitecaps (3-12-9) to complete United’s highest-scoring performance in a league match in three years.

Willis, who replaced the suspended Bill Hamid, made two sterling saves and didn’t seem the slightest bit flustered by the sudden assignment. During the week he had beaten out veteran Steve Cronin, No. 2 on the depth chart, for the job.

“They told us the job is open, so you two go fight for it,” said Willis, a 6-foot-5, third-round draft pick from the University of Denver.

United seized the initiative but lost its sizzle midway through the half and labored to reestablish control — reminiscent of several unfulfilling matches this season. The Whitecaps were enjoying the better of play when Willis and De Rosario turned the match in the final five minutes of the half.

On Camilo’s 25-yard free kick, Willis dived to his right to get a hand on the shot and touch it off the underside of the crossbar. The Whitecaps had three stabs at the free ball before Willis smothered it.

“You wouldn’t have thought that was [Willis’s] first game,” midfielder Clyde Simms said. Camilo’s shot “could’ve changed the entire game, but he makes that save, we gain some momentum and get the goal.”

In added time, De Rosario worked his magic again. He collected the ball with his back to the target and warded off defender Jay DeMerit, then pulled the ball away from a second defender. He surged from both players and created just enough separation to sting a cross past three opponents and Nolly.

Making a back-post run, Pontius beat Jonathan Leathers and, with a baseball-type slide, deflected the ball into the net with his tucked outside leg from four yards.

United doubled the lead three minutes into the second half, thanks to a bumbling effort by Nolly, a former D.C. player. Najar chased his own heavy touch to the end line and one-timed the ball to the near post. Nolly had the corner covered but let the ball slip between his hands and legs.

In the 66th minute, Willis made a reflex leg save on Eric Hassli’s one-timer deep in the penalty area.

With De Rosario attracting multiple defenders, United enjoyed repeated free runs into the box. Pontius added his second goal of the evening (and seventh of the year) by one-timing a deflection from six yards. King struck from 16 yards in the 81st minute, assisted by De Rosario, who has six goals and three assists in seven matches for United.

Willis capped his fine night by pushing Camilo’s distant bid over the crossbar.

“We’re happy for him,” goalkeepers coach Pat Onstad said. “It’s hard when you are the number three [on the depth chart] just to stay positive. When he got his opportunity, he made the most of it.”

United notes: Boasting the conference’s best away record at 4-3-3, United will visit the Chicago Fire (2-7-14) on Thursday and Sporting Kansas City (7-7-9) on Sunday.