The thing about kingship that it's important to remember is that at the end of the day, it's always about leadership/effectiveness and all that guff about legitimacy and a divine right to rule etc. is just propaganda to mollify that bit of human nature that doesn't think it's very wise or particularly fair for that one guy should be in charge just because his dad was.
In medieval France (sort of... it was Francia, so it was technically proto-France or a ß-version of France), the kings came from the Merovingian line of succession. Thing is that somewhere along the way, they had either delegated away or had their effective power/control usurped by their nobles and officials, to the point where the king was just a bearded puppet for the man who was really in control - the Mayor Domo, Charles Martel.
It got to the point where Martel pulled an Odoacer and just declined to appoint a new king when the old one died. His son Pepin later wrote to the Pope, asking whether kingship lay in titles and heritage or where actual power resided. The Pope, needing Pepin to keep local Italian powers in check and himself wanting to break from the nominal power of the Emperor in far-off Qarth Constantinople, answered that the latter was true and anointed Pepin the king of Francia.
Incidentally, this story is why I think the Tyrells in Highgarden and the Martells in Dorne are badly named. The Martells should be ruling in Highgarden (France) and the Dornish (Spanish) should be the Castels/Aragorns/Asturians or something equally pseudo-Spanish-sounding.