The sex ratio of alligators and crocodiles is strongly biased towards females, often as high as 10 females to 1 male. Skewed sex ratios (that is, ratios other than 1:1) are commonly found in species exhibiting environmental sex determination. In crocodilians the temperature of egg incubation is the environmental factor determining sex. If the temperature is cool, around 30 degrees C, the hatchlings are all female. Warmer temperatures, around 34 degrees C, hatch all males. The probability that any particular individual female will successfully reproduce herself is low due to high mortalities of eggs, hatchlings and immatures. However, the crocodilia have great survivorship: no (classified) species of alligator or crocodile has become extinct despite extensive hunting and loss of habitat. We develop a nonlinear age-structured model for the population dynamics of alligators and crocodiles based on key life-history data. From our modelling we conclude that: (i) sex ratio is constrained by survivorship considerations; and (ii) temperature-dependent sex determination in crocodilians is a compromise providing the advantages of sexual reproduction while maintaining an unbalanced sex ratio.