Polypeptide toxins have played a central part in understanding physiological and physiopathological functions of ion channels. In the field of pain, they led to important advances in basic research and even to clinical applications. Acid-sensing ion channels (ASICs) are generally considered principal players in the pain pathway, including in humans. A snake toxin activating peripheral ASICs in nociceptive neurons has been recently shown to evoke pain. Here we show that a new class of three-finger peptides from another snake, the black mamba, is able to abolish pain through inhibition of ASICs expressed either in central or peripheral neurons. These peptides, which we call mambalgins, are not toxic in mice but show a potent analgesic effect upon central and peripheral injection that can be as strong as morphine. This effect is, however, resistant to naloxone, and mambalgins cause much less tolerance than morphine and no respiratory distress. Pharmacological inhibition by mambalgins combined with the use of knockdown and knockout animals indicates that blockade of heteromeric channels made of ASIC1a and ASIC2a subunits in central neurons and of ASIC1b-containing channels in nociceptors is involved in the analgesic effect of mambalgins. These findings identify new potential therapeutic targets for pain and introduce natural peptides that block them to produce a potent analgesia.