  We prove an almost sure invariance principle that is valid for general
classes of nonuniformly expanding and nonuniformly hyperbolic dynamical
systems. Discrete time systems and flows are covered by this result. In
particular, the result applies to the planar periodic Lorentz flow with finite
horizon. Statistical limit laws such as the central limit theorem, the law of
the iterated logarithm, and their functional versions, are immediate
consequences.
