Neither, because the power dynamic shifted between the church and the kings.
In the Middle Ages, the powerful figures in the church and royal families competed for authority. A key example would be the investiture controversy between Holy Roman Emperors and the papacy during the 11th and 12th centuries. "Investiture" (from Latin) refers to putting someone "in the robe" or vestments of clergy. Reforms instituted during the tenure of Pope Gregory VII (in office 1073 - 1085) aimed to remove secular rulers' authority to appoint bishops within their territories, and have all control of appointment to church offices held by the church's leadership. Pope Gregory VII and Holy Roman Emperor Henry IV had a famous struggle with each other over that issue, and the struggle continued between their successors as emperor and pope.
A similar struggle took place at the end of the 13th century and first years of the 14th century, between King Philip IV of France and Pope Boniface VIII. Philip was seeking tax revenues from the clergy and the lands they controlled in France, and the pope vehemently opposed this. Boniface issued a famous papal bull, Unam Sanctam, threatening Philip with excommunication. In response, Philip went as far as sending soldiers to Rome to attack the pope.
So, you can see that powerful popes and kings vied with one another during the medieval era.