Let G = H ⋉ K denote a semidirect product Lie group with Lie algebra g = h⊕k, where k is an ideal and h is a subalgebra of the same dimension as k. There exist some natural split isomorphisms S with S 2 = ± Id on g: given any linear isomorphism j : h → k, we get the almost complex structure J(x, v) = (−j −1 v, jx) and the almost paracomplex structure E(x, v) = (j −1 v, jx). In this work we show that the integrability of the structures J and E above is equivalent to the existence of a left-invariant torsionfree connection ∇ on G such that ∇J = 0 = ∇E and also to the existence of an affine structure on H. Applications include complex, paracomplex and symplectic geometries.2010 Mathematics Subject Classification. 53C15, 53C55, 53D05, 22E25, 17B56.