Abstract: Ant societies are present in most terrestrial biotopes, and they often show a remarkable ability to adapt to extreme environmental conditions. Many ant species inhabit areas where flooding occasionally occurs. For example, Lasius flavus (Fabricius, 1782) nests on tidal meadows with unpredictable winter flooding, and they survive the inundation due to their low metabolic activity and to small air bubbles trapped in the soil. Other species, such as Formica selysi Bondroit, 1918, survive flooding by forming swimming rafts of ants and brood and drift to dry environment. The ant communities in regularly inundated habitats of the Brazilian Amazon move their colonies up in the trees during the months of flooding. In tropical mangroves, another regularly inundated habitat, some ant species live under conditions where several environmental factors are extreme all the year round. Ants nesting in the tidal part of the mangrove need to select a nesting behavior which prevents them from drowning. The Australian ant Polyrhachis sokolova Forel, 1902 escapes the flooding in small "air pockets" in their galleries in the mangrove mud, whereas the intrusion of water to the twig nesting Australian ant Camponotus anderseni Mcarthur & Shattuck, 2001 is prevented by a soldier blocking the entrance hole during the inundation. The exclusion of water also prevents gas exchange, and in the nests of C. anderseni, the CO2 concentration can reach very high levels of > 30% and conditions can become anoxic. Camponotus anderseni can reduce its metabolism (measured as CO2 production) to about 1% of normal metabolism when the CO2 concentration reaches about 25%. Mangrove ants can shift to anaerobic metabolism, which has not been demonstrated for other social insects. The benefits for the ants living under these extreme conditions are mainly lack of competition for nesting sites and food.