 The area was prosperous during the 14th century under the rule of Serbian emperor Stefan Dušan, who encouraged law enforcement, which helped the Bay of Kotor to become a safe place for doing business.In 1389 Tvrtko I, the founder of the Bosnian Kingdom, was able to control the Adriatic littoral between Kotor and Šibenik, and even claimed control over the northern coast up to Rijeka, and his own independent ally, Dubrovnik (Ragusa).This was only temporary, as Hungary and the Venetians continued their struggle over Dalmatia after Tvrtko's death in 1391.