We prove that, for (adapted) stationary processes, the so-called Maxwell-Woodroofe condition is sufficient for the law of the iterated logarithm and that it is optimal in some sense. That result actually holds in the context of Banach valued stationary processes, including the case of L p -valued random variables, with 1 ≤ p < ∞. In this setting we also prove the weak invariance principle, hence generalizing a result of Peligrad and Utev [45]. The proofs make use of a new maximal inequality and of approximation by martingales, for which some of our results are also new.MSC 2010 subject classification: 60F17, 60F25, 60B12; Secondary: 37A50 Key words and phrases. Banach valued processes, compact law of the iterated logarithm, invariance principles, Maxwell-Woodroofe's condition.I am thankful to Jérôme Dedecker for providing him with a copy of [58]. I wish to thank two anonymous referees for valuable remarks that yielded an improved presentation of the paper.