In this study, we solve the continuous contact problem of two layers with different material properties, loaded with two rigid flat blocks and resting on a rigid plane, by analytical and finite element methods. All surfaces are assumed to be frictionless. The upper layer is the functionally graded layer (FG), the height h(1), the underlying layer is homogeneous, and the height is h(2). It is assumed that the FG layer is isotropic and that the shear modulus and density change exponentially. The FG layer is loaded by means of two rigid flat blocks whose external loads are Q and P (per unit thickness in z direction). In the analytical solution of the problem, stress and displacement expressions are substituted in the boundary conditions and the problem is demoted to singular integral equations where the contact stresses are the unknown functions. These singular integral equations are solved numerically using the Gauss-Chebyshev integration formulas. Two-dimensional finite element analysis of the problem is performed using the ANSYS package program. The analyses are performed for different shear modulus ratios (mu (2)/mu (-h1)), distances between the blocks ((c-b)/h(1)) and inhomogeneity parameters (beta h(1)). The contact stresses under the blocks, the normal stresses (sigma (y)) between interfaces of the FG layer and the homogeneous layer and between the homogeneous layer and rigid plane are also measured. In addition, the initial separation load and the initial separation distances (chi (cr), lambda (cr)) of the FG layer and homogeneous layer are determined. The results are presented comparatively as graphs and tables.