The objective of this paper is to analyse an iterative procedure for the finite element solution of the Stokes and Navier-Stokes stationary problems. For the latter case, the usual condition on the viscosity and the data that ensures uniqueness is assumed. The method is based on the iterative imposition of the incompressibility condition via penalization. Theoretical and numerical results show that this constraint can be approximated iteratively within the same iterative loop used to deal with the nonlinear term of the equations. Two particular iterative schemes are analysed, namely those based on the Picard and Newton-Raphson algorithms.