Buckling and postbuckling behavior of toroidal shell segment (TSS) made of functionally graded porous material (FGPM), exposed to a thermal environment, surrounded by an elastic medium and subjected to combined action of axial compression and lateral pressure are investigated in this paper. Material constituents are varied across the thickness according to power-law functions, while porosities are distributed in the TSS in the form of cosine functions of thickness variable. Governing equations in terms of deflection and stress function are derived based on classical shell theory taking into account geometrical nonlinearity and interactive pressure from surrounding elastic media. Multi-term analytical solutions are assumed for simply supported TSSs and Galerkin method is used to obtain nonlinear load-deflection relations from which buckling loads can be derived. Parametric studies are carried out to access the influences of material and geometry properties, porosity coefficient and distributions, preexisting loading conditions, thermal environments and surrounding elastic media on the buckling resistance and postbuckling load carrying capabilities of FGPM TSSs.