In the context of the numerical simulation of seismic wave propagation, the perfectly matched layer (PML) absorbing boundary condition has proven to be efficient to absorb surface waves as well as body waves with non grazing incidence. But unfortunately the classical discrete PML generates spurious modes traveling and growing along the absorbing layers in the case of waves impinging the boundary at grazing incidence. This is significant in the case of thin mesh slices, or in the case of sources located close to the absorbing boundaries or receivers located at large offset. In previous work we derived an unsplit convolutional PML (CPML) for staggered-grid finite-difference integration schemes to improve the efficiency of the PML at grazing incidence for seismic wave propagation. In this article we derive a variational formulation of this CPML method for the seismic wave equation and validate it using the spectral-element method based on a hybrid first/secondorder time integration scheme. Using the Newmark time marching scheme, we underline the fact that a velocity-stress formulation in the PML and a second-order displacement formulation in the inner computational domain match perfectly at the entrance of the absorbing layer. The main difference between our unsplit CPML and the split GFPML formulation of Festa and Vilotte (2005) lies in the fact that memory storage of CPML is reduced by 35% in 2D and 44% in 3D. Furthermore the CPML can be stabilized by correcting the damping profiles in the PML layer in the anisotropic case. We show benchmarks for 2D heterogeneous thin slices in the presence of a free surface and in anisotropic cases that are intrinsically unstable if no stabilization of the PML is used. Keyword: Perfectly matched layers, Spectral elements, Boundary conditions, 1 Universite de Pau et des Pays de l’Adour, CNRS and INRIA Magique-3D. Laboratoire de Modelisation et Imagerie en Geosciences UMR 5212, Avenue de l’Universite, 64013 Pau cedex, France. E-mail:roland.martin@univ-pau.fr, dimitri.komatitsch@univ-pau.fr 2 Institut universitaire de France, 103 boulevard Saint-Michel, 75005 Paris, France. 3 Department of Electrical and Computer Engineering, University of Kentucky, Lexington, KY 40506-0046, USA. E-mail:gedney@engr.uky.edu A Variational Formulation of a Stabilized Unsplit Layer 275