This article develops a fully coupled hydro-thermo-mechanical formulation based on the direct stiffness method for analysis of steel and reinforced concrete structural space frames. The superiority of the developed formulation lies in developing the direct stiffness method for fire analysis, which enables use of a much coarser spatial mesh when compared to existing fire analysis frameworks. Effects of temperature-dependent material properties, damage due to fire and pore pressure, nonlinear thermal gradients, and large deformations of structural members are directly integrated into the stability and bowing functions in the construction of the member stiffness matrix. This alleviates the need to perform element-level numerical quadrature, typically required by all existing finite element–based approaches. Full coupling between the pore pressure, thermal and mechanical solvers is considered through a two-level spatial discretization strategy with a staggered scheme for the numerical solution procedure. Five numerical examples are presented to demonstrate the accuracy and efficacy of the developed formulation in analysis of steel and reinforced concrete structural members and frames. © The Author(s) 2018.