If any evil forces were lurking Friday night along the Bangor waterfront, Hassan Hakmoun drove them away and called down healing spirits that blanketed the American Folk Festival crowd at the Railroad Stage.

“Feel the spirit,” he told the crowd, “and pray for the world to become one.”

Hakmoun was born in 1963 in Marrakech into a musical family whose roots are Gnawa, or, the people from southern Morocco. At 7, he began playing the santir, a three-stringed, long necked lute that he calls “the granddaddy of all bases,” for traditional Gnawa healing ceremonies. After studying his craft and playing throughout northern Africa and Europe, Hakmoun moved to New York City in 1987. He still is based there and has won awards for blending traditional Moroccan music with funk.

Three men joined him on stage – one played a traditional American drum set, another played the qaraqeb, a set of metal double castanets, and third played a set of drums called tbel that resembled bongos but produced a much richer sound. Hakmourn danced as he played while the qaraqeb player twirled around like a whirling dervish, the tassel on his red satin hat arcing in a circle around his head.

Hakmoun and his group resembled a jazz ensemble. They seemed to be improvising rather than playing songs passed down from one generation to another or written down somewhere.

If the Acadian music is the soul of this year’s folk festival, then Hakmoun’s Moroccan tunes are its pulsating heart pumping blood through every vein, igniting flashes of ecstasy, filling festival goers with a passion they never suspected they were missing. It also healed whatever had been ailing them all week.

Hassan Hakmoun will perform at 3 p.m. Saturday at the Railroad Stage and at 4:45 p.m. Saturday at the Dance Stage.