One of the primary claims to power in medieval Europe was the divine decree, something that was usually "approved" by the Roman Catholic Church, so yes religion has had an absolutely insane amount of influence on politics, so much so that you can easily argue that it was responsible for predominance of monarchies and dictatorships until the enlightenment (and even then it took centuries).
Entire governments have risen and fallen on top of the backs of religions and their schisms and reformations.