CHICAGO — Franz Wagner scored 25 points, Jamal Cain added 20 and the Orlando Magic remained in the running to avoid the play-in tournament by beating the Chicago Bulls 127-103 on Friday night.

Orlando’s fifth straight win, combined with Toronto’s loss to New York, moved the Magic (45-36) into a tie with the Raptors for sixth place in the Eastern Conference with one game remaining.