KANSAS CITY, Kan. – In six minutes of stoppage time, Sporting Kansas City went from looking at a frustrating, sloppy loss to celebrating their first victory over the Philadelphia Union since the 2013 regular season finale.

The winless Union (0-3-2) were up 2-1 after 90 minutes on Sunday night, only to see Jalil Anibaba equalize in the first minute of stoppage time. Then, three minutes later, Krisztian Nemeth – a second-half sub who missed Kansas City's last two matches with a knee strain – scored his first goal of the year to hand Sporting the 3-2 decision and run their unbeaten string to three straight.

It was the first time Kansas City (2-1-2) scored more than one goal in a match this year, and it couldn't have come at a more opportune time.

Philadelphia led 2-1 after a wild first 20 minutes that saw both sides struggle to defend set pieces. Both ‘keepers had costly howlers, starting with Luis Marin's gaffe in the third minute.

Marin, who had recorded two straight clean sheets for Kansas City, whiffed a two-handed punch attempt on Sebastien Le Toux's in-swinging corner kick. The ball bounced off Sporting winger Jacob Peterson's shoulder and into the goalmouth – far enough over the line that the goal stood despite Anibaba's frantic attempt to clear it away.

In the 16th minute, it was Rais Mbolhi's turn to botch a set piece. He collided with a teammate while trying to track down Benny Feilhaber's corner to the back post, and Dom Dwyer – who was scoreless in Sporting's first four matches after bagging a club record 22 in league play last year – was there to head home the equalizer and open his 2015 account.

The deadlock lasted all of three minutes before it was broken by another set piece goal. This time, there was nothing Marin could do, with Fernando Aristeguieta's long header of a Le Toux free kick bouncing off the right post and into the back of the net.

Dwyer put two more balls in the net before the hour mark, including a header off yet another set piece in the 59th minute, but the first was flagged for offside and he was called for a foul on the header.

Aristeguieta also had a goal waved off, seeing his opportunistic 54th minute strike disallowed after a Union teammate was called offside.

Sporting had a prime chance to equalize in the 84th minute, when Dwyer and Peterson both got past Mbolhi after he failed to control a through ball into the area, but neither could get a clear look in the crowded space and defender Raymon Gaddis cleared the ball to safety for the Union.

Le Toux could have given the Union a 3-1 lead in the 87th minute, but his shot hit the right post and midfielder Michael Lahoud drove his putback attempt over the crossbar.

Sporting made the Union pay for missing their golden chance, with Anibaba's header finding the lower right corner of the net and Nemeth poking home Matt Besler's flick-on following a corner from Feilhaber.

Both teams return to conference play on Saturday, with Sporting at home against Real Salt Lake and the Union hosting New York City FC.

Steve Brisendine covers Sporting Kansas City for MLSsoccer.com.