Among the Melanesians, the distinction of good and evil spirits does not seem to exist, but in Christian doctrine it was essential. Satan, as well as the Deity, could work miracles ; but Satan worked them to help wicked men, while the Deity worked them to help good men. This distinction, as appears from the Gospels, was already familiar to the Jews of the time of Christ, since they accused Him of casting out devils by the help of Beelzebub.
More info.: https://russell-j.com/beginner/RS1935_04-080.HTM