A new method can greatly extend the life of inexpensive, compact, lightweight metal-air batteries.