  We analyze the evolution of a Friedmann-Robertson-Walker spacetime within the
framework of $f(R)$ metric gravity using an exponential model. We show that
$f(R)$ gravity may lead to a vanishing effective cosmological constant in the
far future (i.e. $R\rightarrow 0$) and yet produce a transient accelerated
expansion at present time with a potentially viable cosmological history. This
is in contrast with several $f(R)$ models which, while viable, produce in
general a non-vanishing effective cosmological constant asymptotically in time
($R\rightarrow 4\Lambda_{\rm eff}$). We also show that relativistic {stars in
asymptotically flat spacetimes can be supported within this framework without
encountering any singularity, notably in the Ricci scalar $R$.
