Take the cleaned chicken thighs in a cooking pot. Add 1/3 of the sliced onions to it.
Next combine the spices in a small preparation bowl - ras el hanout through Aleppo red pepper. Add 1/3 of that to the chicken and save the remaining spice mix. Then add 1/3 of the grated ginger to the chicken.
Add about 1/2 cup water to the chicken. Turn on the heat to high and let the water sizzle. Lower the heat and cook the chicken until it is well done.
The chicken will release its own juices. If needed, add a little more water. When the chicken is cooked, reserve two tablespoons of the spiced liquid, if remaining.
Debone the well cooked chicken using a fork. Shred the chicken meat.
Heat 1/2 tablespoon oil in a skillet and sauté the remaining sliced onions until golden brown. Stir the ginger.
Add the shredded chicken, remaining spices, ginger, saffron water, chopped prunes, salt, herbs and combine it all. Adjust the seasoning to your taste. Transfer the chicken mixture to a prep bowl.
Heat one teaspoon of oil in the skillet and add the whisked eggs (save one tablespoon for later) and scramble. Then add the two tablespoons of spiced liquid saved from previous step. Season with salt.
Next add the scrambled eggs and almonds to the chicken mixture. Combine it all gently and set aside.
Thaw the Phyllo dough as per instructions – overnight in the refrigerator and an additional 4 hours or more at room temperature.
Preheat oven at 350 degrees F (adjust this as per oven, increase to 375 if needed).
Remove the phyllo dough sheets out of the package. Unwrap and cover it with a damp thin kitchen towel.
Grease a 10 inch iron skillet with oil. Unroll one phyllo sheet and lightly brush with oil. Carefully transfer the phyllo sheet on to the skillet making sure to center it and lightly press it into the base of the skillet.
Brush 8 more sheets, one at a time, and lay over the skillet in a similar fashion, making sure to rotate the placement slightly each time. After placing the 9 oil-brushed sheets, it should look like a fan, such that the sheets are layered uniformly in a circular fashion.
Spread half of the filling on to the layered phyllo sheets. Fold couple of phyllo sheets over the filling.
Layer 9 more oil-brushed phyllo sheets on the filling just like in steps 4 and 5. Spread the remaining filling over the phyllo sheets. Fold over all of the phyllo sheets on top of the filling, tucking the sides into the skillet.
Brush the remaining two phyllo sheets with oil and layer one at a time on to the chicken pie and tucking the sides into the skillet. Mix 1/2 tablespoon oil (or ghee/melted butter) with one tablespoon whisked egg and brush on the top.
Bake for about 25 to 30 minutes until nicely golden brown. Let it cool for 5 minutes and dust with almond meal or confectioners sugar + cinnamon mixture.
Ras el hanout, the Moroccan spice blend is available at Moroccan/Middle eastern grocery stores or online.
I used olive oil for most of the chicken pastilla and drizzled some ghee on the top for flavor.
Traditionally the pie is dusted on the top with confectioners sugar and cinnamon. I used finely powdered almond meal instead.