During the colonial time, shortages and little support from Spain plagued St. Augustine. Florida was always problematic to Spain. The small outpost produced few resources and had to rely on support from the outside. There was no gold or silver like elsewhere in the Americas, and St. Augustine was more of a drain on the royal treasury than anything else was. The main reason why it was there was because it was the only major city or outpost on the Florida coast, and vital as a Spanish presence and last stopover for shipping before returning to Europe.
England challenged Spanish claims to North America by establishing its own colonies, like Charleston, in 1670. For about the next 45 years both empires would fight an undeclared war, mostly in what is now Georgia.
Meanwhile the French tried their hand at claiming territory by establishment of Louisiana territory. Mobile was founded in 1702. Spain countered by establishing Pensacola.
These tensions increased the importance of a Spanish presence in Florida, so the Castillo was strengthened and fortified to the old walls that we are familiar with today. (Both the Spanish and Americans later built some outer works, but that is for another time.)
The Spanish King Charles II died in 1700. Since he was a Hapsburg, Archduke Charles of Austria claimed the throne. But Charles II had willed the throne to Philip of Anjou, grandson of Bourbon French King Louis XIV. England didn't want a France-Spanish empire under a Bourbon monarch, so they allied with Austria and the Hapsburgs. This struggle for the Spanish throne became known as the War of Spanish Succession, or in North American, Queen Anne's War.
In the New World, the English didn't want to wait for the first move made by the French and Spanish allied together, so they struck the first blow. Carolina Governor James Moore gathered Native allies and destroyed the Spanish missions in Guale and northern Florida. Moore found the St. Augustine Castillo impenetrable, but ravaged the surrounding countryside and town outside the fort.
As we know, these raids by Moore decimated the local native Timuquan and Guale populations. English slave raids went as far south as what is now Fort Myers and decimated the Calusa population.
Many Indian allies of the English remained in Florida to wreck havoc. Those who stayed became Seminoles. In 1707 St. Augustine Governor Corcoles reported that even though they were starving from lack of provisions, they were unable to venture outside the range of the cannons on the fort walls. Anyone who ventured beyond the gun range was killed or captured by the Indians. Soldiers had to escort women and children outside the fort at night to tend to gardens, collect maize or oysters. By 1712 no cat, dog, or horse was safe from being consumed by the famished people at St. Augustine.