D.C. United goalie Bill Hamid is escorted off the field after he was shown a red card early in a 3-3 draw against Toronto FC. Earlier this week, Hamid earned a call-up to the U.S. national team. (Mitchell Layton/GETTY IMAGES)

D.C. United faltered at home again Saturday night, settling for a 3-3 draw with last-place Toronto FC, but the circumstances were unlike any of the previous disappointments — or, for that matter, any match in recent memory.

Goalkeeper Bill Hamid, in his first appearance since receiving a U.S. national team invitation, was red-carded after seven minutes. Despite playing shorthanded, United twice claimed the lead on goals by Dwayne De Rosario — and each time the Canadian club answered.

United Coach Ben Olsen was ejected in the second half when Toronto scored while he was making a substitution — a chaotic sequence in which referee Jasen Anno allowed play to continue before entering defender Ethan White could take his position.

Hamid’s replacement, Steve Cronin, yielded another soft goal in the 86th minute before De Rosario completed the hat trick on a penalty kick two minutes later in front of 11,684 at rainy RFK Stadium.

“I don’t even know what just happened,” Olsen said. He declined to discuss the substitution incident, instead praising the “heart of that group out there that got [jobbed] every which way, didn’t get a call all night, but they found a way to get one point and it should’ve been three.”

When the madness ended after eight minutes of added time, however, United (6-6-9) saw its winless streak in MLS home matches increase to seven. Toronto, winless on the road, is 3-11-11 overall.

United’s home hex resurfaced when Hamid rushed out of the box and upended Eric Avila. Defender Brandon McDonald had failed to seal off Avila. Hamid went into a tackle with force, sending Avila into a spectacular flip.

Cronin made his first league appearance of the season, and midfielder Stephen King left the match as United embarked on a grueling, 83-minute challenge.

“That play kills the game and made the guys do a lot of work,” Olsen said. “It’s just not good enough. That play haunted us.”

Despite the personnel shortage, De Rosario exhibited his match-altering abilities from start to finish. In the 19th minute, Santino Quaranta slipped a free kick into space, but instead of seizing possession, the unmarked De Rosario let the ball do the work. When it rolled into his comfort zone, he smashed a one-timer from 25 yards that skidded off diving goalkeeper Stefan Frei’s hands.

Toronto broke through in the 52nd minute when Cronin’s punched clearance caromed off McDonald and fell to sub Peri Marosevic for an unchallenged tap-in.

De Rosario restored the lead, 2-1, in the 64th minute. Chris Pontius’s service was misplayed by Andy Iro at the top of the box. De Rosario pounced on it, calmly rounded Frei and finished from eight yards.

Five minutes later, Toronto tied it when Cronin failed to stop Julian de Guzman’s distant shot. However, play should’ve stopped on the Toronto throw-in that led to de Guzman’s effort. White was prepared to enter for the injured McDonald, who was being treated behind the goal.

Anno did signal for White to enter but didn’t stop the game long enough for White to take his position. De Guzman took advantage of ample space in the middle of the field and smashed the 30-yarder past Cronin.

“The fourth official was screaming to stop play, play didn’t stop and de Guzman shot it,” said White, who was charging onto the field when play resumed. “Play has to stop on a sub. That’s just unbelievable.”

In a written statement, the officiating crew said: “Play was stopped and the referee beckoned the substitute. The senior assistant referee and the fourth official told the player to enter the field, which he did. Play was restarted with the whistle.”

Said De Rosario: “I definitely didn’t hear a whistle and you could tell by our reaction we didn’t hear a whistle. You wait for a defender to get into his position — that’s just sportsmanlike. [Anno] didn’t.”

Commenting on the shot, Cronin said: “It dances all over the place on me and got by. That one I definitely regret.”

About the substitution chaos, de Guzman said: “Many of the best teams in the world — how should I put it? — cheat when they have the chance to do something.”

Toronto took the lead in the 86th minute when Danny Koevermans stabbed a low shot. According to Cronin, Iro made slight contact with the ball as he stood next to the goalie, and the ball slid under him. Koevermans was credited with the goal.

A minute later, Anno awarded United a penalty kick when Iro knocked down Austin da Luz. De Rosario converted in the 88th minute.

“We showed unbelievable character,” captain Josh Wolff said. “We put in a good effort and felt like we still could’ve won. It was a bizarre one.”