D.C. United was heading down a familiar and ruinous path Sunday, falling behind early in the second half when a ball bonked off a defender’s head and into the net. But in a season that has gone so terribly wrong, United had a refreshing response.

Kyle Porter’s sliding volley five minutes later earned a 1-1 draw with Sporting Kansas City in front of 13,612 at RFK Stadium, ending United’s losing streak at a club-record seven and securing a point for the first time in nine weeks.

“It beats losing,” Coach Ben Olsen said. “It wasn’t a great performance, but it was a gutsy performance and what we needed right now to change our course.”

For a change, United (1-8-2) also had a dreadful call work in its favor. Twice this season, dodgy rulings have erased United goals. This time, assistant referee Matthew Nelson incorrectly signaled offside on an apparent goal by Sporting (6-4-3) in the 30th minute. Afterward, Nelson admitted he had “misjudged the play.”

The reprieve helped United end a four-game losing streak at home and regain its balance heading into Saturday’s visit by Portland (4-1-7).

“It’s not a win,” captain Dwayne De Rosario said, “but it’s a step in the right direction.”

Not including De Rosario, the average age of United’s starting lineup was 23.5, with seven players 23 or younger. Chris Pontius returned from a three-game absence, entering at intermission, and winger Nick DeLeon started for the first time since late March.

Notoriously weak at the start of games, United made it to the 30-minute mark without conceding a goal — but only because of Nelson’s call.

Matt Besler crossed from near the end line to Jacob Peterson, who slotted the ball between defenders Dejan Jakovic and Daniel Woolard to Ike Opara on the back side for an easy tap-in.

When Peterson delivered the pass, Jakovic was a yard behind Opara and Porter, who had tried to prevent Besler’s cross, was four or five. When Nelson’s flag went up, Opara flashed an expression of disbelief: hands on top of his head, eyes bulging, mouth agape.

“I think he is going to be disappointed by his decision,” Opara said, prophetically.

Added Kansas City Coach Peter Vermes: “It’s a big mistake. It’s a major mistake.”

In the 39th minute, United’s Bill Hamid made a fine kick save on former Maryland Terrapin Graham Zusi.

Sporting went ahead in the 60th when Opara rose to head Zusi’s corner kick and made glancing contact. The ball remained in flight and smashed off D.C. defender Ethan White’s head and past Hamid for an own goal.

United drew even when Pontius swung a gorgeous long cross toward Porter on the back side. The Canadian made a sliding effort inside the six-yard box and volleyed into the far corner for his first MLS goal.

“We needed something,” Porter said of United’s response.

Hamid disrupted a 77th-minute scramble in the six-yard box, and after Jimmy Nielsen made a low save on Porter’s bid in transition, the diving Hamid got his fingertips on Claudio Bieler’s drive directed at the lower right corner.

“It was pretty complete from a focus standpoint and commitment,” Olsen said of his team’s performance. “Now, we still tied, so it’s a little strange to be too positive, but that is who we are right now.”

United notes: Forward Rafael was not in uniform after suffering a concussion Friday. Midfielder Raphael Augusto, who started five of the previous six matches, was excused for family issues.

Spirit loses in Portland

Christine Sinclair scored in the 41st minute and Alex Morgan added a late goal as the Portland Thorns defeated the visiting Washington Spirit, 2-0, in a National Women’s Soccer League match before 12,474 at Jeld-Wen Field. The Spirit (1-3-3), which scored four times at Seattle on Thursday, suffered its first shutout. Chantel Jones made her first start in goal for Washington, replacing Ashlyn Harris (sore knee). The Thorns are 5-1-1.