The order began around 1099 in Jerusalem as a genuinely humble institution: a hospital, founded by a monk known as Blessed Gerard, dedicated to caring for sick and injured pilgrims arriving in the Holy Land regardless of their faith. Pope Paschal II formally recognised the order in 1113, and as the Crusader states faced continuous military pressure, the originally charitable Knights Hospitaller gradually took on a military role alongside their medical mission β monks who were also, increasingly, soldiers.
Following the fall of the last Crusader stronghold at Acre in 1291, the order relocated first to Cyprus and then, in 1310, conquered the island of Rhodes outright, ruling it as an independent, sovereign military-religious state for over two centuries. This is the point at which the order transforms from a religious-military brotherhood operating within someone else's kingdom into an actual sovereign power in its own right, complete with its own navy, fortifications and diplomacy.
In 1522, Ottoman Sultan Suleiman the Magnificent laid siege to Rhodes with an overwhelming force; after six months of resistance, the heavily outnumbered Knights negotiated an honourable surrender and withdrew from the island. Homeless as a sovereign order for eight years, they were finally granted the islands of Malta (and briefly Tripoli) in 1530 by Holy Roman Emperor Charles V β for an annual tribute of a single Maltese falcon, a detail later immortalised, loosely, in fiction.