Ljudevit (pronounced ) or Liudewit (Latin: Liudewitus), often also Ljudevit Posavski, was the Duke of the Slavs in Lower Pannonia from 810 to 823. The capital of his realm was in Sisak (today in Croatia). As the ruler of the Pannonian Slavs, he led a resistance to Frankish domination. Having lost the war against Franks, he fled to the south, presumably to Dalmatia, first to an unknown Serb župa (a topic of historical debates), and then to the Croat ruler Ljudemisl, who treacherously killed him.
 In 818 Ljudevit sent his emissaries to Emperor Louis in Heristal. They described the horrors conducted by Margrave Cadolah of Friuli (800-819) and his men in Pannonia, but the King of Franks refused to make peace. Ljudevit raised a rebellion against his Frankish rulers in 819 after he was seriously accused by the Frankish court. The Emperor Louis the Pious (814-840) sent Cadolah to quell the rebellion. The Frankish Frontier forces led by Cadolah have raided the land and tortured the population, most notably the children. As the Pannonian Slavs were amassing forces, so did the Franks led by Cadolah return in 819. But the Frankish forces were soon defeated; and Cadolah himself had to retreat back to his home Friuli, where soon he died of disease.
 In July 819 on the Council in Ingelheim Ljudevit's emissaries offered truce conditions, but Emperor Louis refused; demanding more concessions to him. Ljudevit started to gather allies for his plight. His original ally was Duke Borna (Dux Dalmatiae et Liburniae) - the leader of the Guduscani (Gačani), but the Frankish ruler had promised Borna that he would make him Prince of Pannonia if he helped the Franks to crush Ljudevit's rebellion; so Borna accepted. Ljudevit found assistance among the Carantanian and Carniolan Slavs who, as neighbours of the margravate of Friuli, were jeopardized the same as the Pannonians. The Timočani (living around the valley of Timok) also joined him, because they were jeopardized by the neighbouring Bulgars.[citation needed]
 The Franks sent a large army led by the new Margrave of Friuli, duke Baldric of Friuli to meet Ljudevit in autumn, the same year while he was conscripting more Carantanian troops along the Drava river. The Frankish forces had numerical advantage, so they pushed Ljudevit and his men from Carniola across the Drava. Ljudevit had to fall back to central parts of his realm. Baldric didn't chase Ljudevit, since he had to pacify the Carantanians. Borna moved with Ljudevit's father-in-law Dragomuž and their forces from the south-west. At the heat of the Battle of Kupa, his own Guduscani abandoned Borna and crossed to Ljudevit's side; while Dragomuž was killed. Borna escaped from the battlefield with the help of his bodyguards.
 Ljudevit seized the opportunity and breached into and raided Dalmatia in December. Borna was too weak, so the Dalmatians defended themselves through sneaky tactics and used attrition as their best ally to exhaust the Pannonian forces. Harsh winter came to the hill areas, forcing Ljudevit to retreat. According to Borna's reports to the Frankish Emperor, Ljudevit suffered heavy casualties: 3,000 soldiers, over 300 horses and much food.
 In January of 820, Borna made an alliance with the Frankish Emperor in Aachen. The plan was to crush Ljudevit's realm with a joint-attack from three sides. As soon as the winter retreated, massive Frankish armies were being amassed in Italia, East Francia, Bavaria, Saxony and Alemannia that were going to simultaneously invade Ljudevit's lands in the spring. The northern Frankish group moved from Bavaria across Pannonia to make an invasion across the river of Drava. Ljudevit's forces successfully stopped this Army at the river. The southern group moved across the Noric Alps, using the road from Aquileia to Emona.[citation needed] Ljudevit was successful again, as he stopped them before crossing the Alps. The central group moved from Tyrol to Carniola. Ljudevit attempted to halt its advance three times, but every single time would the Franks win, using numerical advantage. When this Army reached the Drava, Ljudevit had to fall back to the heart of his realm.
 The Franks have opened ways for the southern and northern Armies, so they launched a total invasion. Ljudevit concluded that all resistance would be futile, so he retreated to a stronghold that he built on top of hill that was heavily fortified; while his people took shelter in local forest and swamps. Ljudevit did not negotiate with the Franks. The Franks eventually retreated from his lands, with their ranks thinned by disease which the northern forces caught in the marshes of Drava. The Slavs from Carantania lost their internal independence and were forced to recognize the Friulian margrave Balderic as their ruler, while some remained loyal to Ljudevit. Prince Borna died in 821, and was succeeded by Ljudevit's nephew, Vladislav. Emperor Louis recognized as Prince of Dalmatia and Liburnia in February 821 at the Council of Aachen.
 The Emperor discussed again about war plans against Ljudevit on that Council. The Franks decided to repeat the progress, and push towards Ljudevit from three sides again. Ljudevit saw that it was obvious that he couldn't fight the Franks on open field, so he began to construct massive fortifications. He was helped by the Venetian Patriarch Fortunat who sent him architects and masons from Italy.
 During the last and final Frankish invasion of 822, the Patriarch from Grado, Fortunat, who was a supporter of Ljudevit, fled to Zadar into exile with the Byzantines.
 According to Einhard, the writer of the Royal Frankish Annals, following the final Frankish attack, Ljudevit fled from his seat in Sisak to the Serbs in 822 (Siscia civitate relicta, ad Sorabos, quae natio magnam Dalmatiae partem obtinere dicitur, fugiendo se contulit.). In the contemporary Vita Hludovici that description of the Serbs is omitted. Ljudevit later killed the local Serbian župan who took him in and temporarily took over the rule in his župa.
 The location and nature of these Serbs mentioned in the primary sources has been a topic of interest for historians since the 19th century. Tadija Smičiklas did not attempt to define the area where Ljudevit fled, while Vjekoslav Klaić wrote it was beyond Sava and Bosna. Ferdo Šišić put the ad Sorabos to the southeast of Sava and Vrbas, near the Dalmatian Croats. Vladimir Ćorović mentioned the flight to the Serbs, but didn't expound on it. The 1953 "History of the peoples of Yugoslavia" published by Školska knjiga added apparently fictitious details to the original story. Anto Babić discussed the original text and whether it was a reference to a single fort or a territory. Svetislav M. Prvanović tried to connect Ljudevit and the Guduscani with the Roman city of Guduscum in eastern Serbia, but using only the interpretation of a single comma in Franjo Rački's text and conjecture. Sima Ćirković thought there was a consensus that the place was somewhere in Bosnia, but called the claims of exact locations speculation. Nada Klaić thought that the place Ljudevit fled to was actually the medieval county of Srb by the river Una. Relja Novaković analyzed Einhard and concluded that the area could be somewhere near Kozara, Grmeč, Una and Kupa. Ivo Goldstein acknowledged and accepted the theory that it was located in Srb, but advocated against misinterpreting the scarce historical records. Radoslav Katičić argued against the theory, and Tibor Živković concurred with him.  According to Mladen Ančić, the mentioning of "Dalmatia" in 822 and 833 as an old geographical term by the authors of Frankish Annals was Pars pro toto with a vague perception of what this geographical term actually referred to. 
 According to John Van Antwerp Fine Jr., it was hard to find Serbs in this area since the Byzantine sources were limited to the southern coast, but it is possible that among other tribes existed a tribe or group of small tribes of Serbs. Živković's 2011 interpretation of the Latin text says the second-hand accounts given to the Franks by their agents in Siscia and Croatia establish the existence of some sort of a Serbian claim over parts of (Roman) Dalmatia, similar to the analogous Frankish claim, but not necessarily settlement outside of places already known from other sources. According to Neven Budak, it's difficult to pinpoint a place within the former province of Dalmatia, but most probably was in central or eastern Bosnia.
 Soon after the incident with the Serbs, Ljudevit sent an envoy to the Frankish court, claiming that he is ready to recognize the Frankish Emperor Louis the Pious as his supreme ruler. However, he again fled, now to Ljudemisl, Borna's uncle in Dalmatia which was the time ruled by new duke Vladislav. In the end Ljudemisl treacherously killed him.