Stabilization of the cubic phase of formamidinium lead triiodide perovskite, together with passivation of undercoordinated lead atoms, can be used to create high-mobility n-type thin-film transistors, which could be combined with existing p-type devices to build complementary circuits.