Carantania situated in today’s Carinthia was established in the 7th century. Carantania was a part of the King Samo’s Empire as Marca Vinedorum until 658. It retained its independence after the collapse of the King Samo’s Empire until the middle of the 8th century. Carantanians felt threatened by the Avars who captured much of the former King Samo’s Empire and turned for help to Bavarians. Allied Carantanian and Bavarian forces defeated the Avars in 743 but Carantania was forced to recognize the Bavarian rule in return for their military assistance against the Avars. However, Bavaria was incorporated into the Frankish Kingdom about the same time and thus Carantania came under the Frankish rule.