A direct integration algorithm to solve the spatially discretized equations of motion of a structure is proposed. This algorithm formulates the equations of motion in state space and uses their analytical solution to derive a recursive discrete-time equation. The proposed structural state procedure (SSP) can be considered as a generalization for multi-degree-of-freedom systems of the Duhamel's integral used for single-degree-of-freedom systems. It can be noted that the proposed SSP algorithm does not need a previous modal uncoupling of the equations of motion and consequently it does not require any hypothesis about damping. SSP is shown to be stable and to give accurate results with a reasonable computation time. Stability and accuracy essentially depend on the computation of the system matrix. The SSP algorithm is combined with an iterative scheme to obtain the response of structures with non-linear behaviour. Two examples of application of SSP are included: seismic response of a building structure with linear behaviour and free vibration of a non-linear system with imposed initial conditions.