We study Demazure modules which occur in a level $\ell$ irreducible integrable representation of an affine Lie algebra. We also assume that they are stable under the action of the standard maximal parabolic subalgebra of the affine Lie algebra. We prove that such a module is isomorphic to the fusion product of "prime" Demazure modules, where the prime factors are indexed by dominant integral weights which are either a multiple of $\ell$ or take value less than $\ell$ on all simple coroots. Our proof depends on a technical result which we prove in all the classical cases and $G_2$. Calculations with mathematica show that this result is correct for small values of the level. Using our result, we show that there exist generalizations of $Q$--systems to pairs of weights where one of the weights is not necessarily rectangular and is of a different level. Our results also allow us to compare the multiplicities of an irreducible representation occurring in the tensor product of certain pairs of irreducible representations, i.e., we establish a version of Schur positivity for such pairs of irreducible modules for a simple Lie algebra. We also present a more refined presentation of a larger family of modules which include Demazure modules.