  We present a local classification of conformally equivalent but oppositely
oriented 4-dimensional Kaehler metrics which are toric with respect to a common
2-torus action. In the generic case, these "ambitoric" structures have an
intriguing local geometry depending on a quadratic polynomial q and arbitrary
functions A and B of one variable.
  We use this description to classify Einstein 4-metrics which are hermitian
with respect to both orientations, as well a class of solutions to the
Einstein-Maxwell equations including riemannian analogues of the
Plebanski-Demianski metrics. Our classification can be viewed as a riemannian
analogue of a result in relativity due to R. Debever, N. Kamran, and R.
McLenaghan, and is a natural extension of the classification of selfdual
Einstein hermitian 4-manifolds, obtained independently by R. Bryant and the
first and third authors.
  These Einstein metrics are precisely the ambitoric structures with vanishing
Bach tensor, and thus have the property that the associated toric Kaehler
metrics are extremal (in the sense of E. Calabi). Our main results also
classify the latter, providing new examples of explicit extremal Kaehler
metrics. For both the Einstein-Maxwell and the extremal ambitoric structures, A
and B are quartic polynomials, but with different conditions on the
coefficients. In the sequel to this paper we consider global examples, and use
them to resolve the existence problem for extremal Kaehler metrics on toric
4-orbifolds with second betti number b2=2.
