Trying to find a movie name but it just doens't want to work

So I watched the movie when I was 5 years old or something. The beginning of the film is about a kingdom where a certain king, had 2 sons and eventually they died. Logically, one son wanted more power and took it. The other son tries to stop this dictatorship with the people who remained loyal. What I especially remember from is that the bad guy had a castle in a desert. and there was a cavalry attack (from the good guys) that was fended off hard by bow and arrow. The film also has some kind of middle east theme I think because someone was trapped in the bad guy’s castle and dressed in oriental clothes. The film ends with the brother ending up among the pigs in the sewer. Not the clearest explanation but I hope someone can help me

Hawk The Slayer (1980)?

I see that in my description I wasn’t clear, it is an animated children movie so no not Hawk the slayer but thanks for responding so fast!

By “middle eastern clothing”, are you saying more Aladdin, or like Egyptian pharaohs?

The Prince of Egypt is about brotherly rivalry: