The losing streak is over.

Orlando City got goals from Chris Schuler and Dom Dwyer to defeat Toronto FC 2-1 and secure their first MLS win since May 6.

It made new Lions coach James O’Connor victorious in his first home match with the club.

“We can be really proud of the players’ effort tonight,” O’Connor said. “The level of commitment and the effort from the players was really, really good.”

O’Connor made a couple major changes to Orlando City’s lineup, benching goalie Joe Bendik for Earl Edwards, Jr. and not making midfielder Justin Meram available for selection.

The Lions scored first for just the third time in 19 matches this season when Schuler finished a header after a shot by Dwyer in the 34th minute.

City tacked on another in the 49th minute when Dwyer delivered a rocket from about 25 yards out.

Edwards, Jr. was poised for a clean sheet until Toronto FC scored on a set piece in stoppage time just moments before the final whistle.

Orlando City returns to action Wednesday at Philadelphia in the quarterfinals of the U.S. Open Cup.