  We study nonlinear gravity theories in both the metric and the Palatini
(metric-affine) formalisms. The nonlinear character of the gravity lagrangian
in the metric formalism causes the appearance of a scalar source of matter in
Einstein's equations that can be interpreted as a quintessence field. However,
in the Palatini case no new energy sources appear, though the equations of
motion get modified in such a way that usual matter can lead to repulsive
gravity at very low densities. Thus, the Palatini formalism could provide a
mechanism to explain the recent acceleration of the universe without the
necessity of dark energy sources. We also show that in contrast to the metric
formalism where only the Einstein frame should be considered as physical, the
Palatini formalism allows both the Einstein and the Jordan frames to be
physically acceptable.
