Structural damage to r.c. buildings located in a near-fault area has been observed during strong ground motions, with long-duration horizontal pulses and high values of the ratio between the peak value of the vertical acceleration and the analogous value of the horizontal acceleration. The design provisions of current seismic codes are generally not very accurate for assessing the structural effects of near-fault ground motions. In the present work, six- and twelve-storey r.c. spatial frames are designed according to the provisions of the Italian seismic code, considering horizontal and vertical seismic loads in a high-risk seismic region and assuming low and high ductility classes. A lumped plasticity model based on the Haar-Kàrmàn principle is used to describe the inelastic behavior of the r.c. frame members. In particular, the lumped plasticity model for a column includes a piecewise linearization of the bounding surface of the axial load-biaxial bending moment elastic domain, at the end sections where inelastic deformations are expected. Moreover, the lumped plasticity model for a girder takes into account the potential plastic hinges along the span, due to the vertical ground motion, so avoiding the computational effort required by the sub-discretization of the frame member. The nonlinear dynamic response of the test structures is studied with reference to the horizontal and vertical components of near-fault records. The occurrence of a directivity effect at arbitrary orientations is checked rotating the horizontal components of the selected motions, rather than considering only fault-normal and fault-parallel orientations.