The star fort was constructed in the immediate vicinity of medieval Osijek after the defeat of the Ottoman forces in 1687, due to Osijek's strategic importance. Constructed starting in 1712 to plans by Mathias von Kaiserfeld and then Maximilian Gosseau de Henef, all five planned bastions and two gates were complete by 1715. By 1735, the inner town was finished and three northern bastions had been added. When complete, it was the largest and most advanced Habsburg fortress on the border with the Ottoman Empire, consisting of eight bastions and featuring armories, depots, a garrison headquarters, military court, construction office, a garrison physician, guardhouse, officers' apartments, a military hospital and seven barracks. The completed fort was entirely surrounded with walls and palisades and had four main gates at each side (north, south, east, west). Tvrđa had street lights by 1717 and was the site of the first public water supply in Croatia, opened in 1751.