Canonical Reference: Sedaka Sutta (The Acrobats Discourse) Verified Source

“One who protects oneself protects others; one who protects others protects oneself. By cultivating mindfulness and inner peace, one protects oneself; by cultivating patience, harmlessness, love, and compassion, one protects others.”

Canonical Pali Original: Attānaṃ, bhikkhave, rakkhanto paraṃ rakkhati, paraṃ rakkhanto attānaṃ rakkhati. Kathañca, bhikkhave, attānaṃ rakkhanto paraṃ rakkhati? Āsevanāya, bhāvanāya, bahulīkammena... khantiyā, avihiṃsāya, mettatāya, anuddayatāya...

— Gautam Buddha
The Awakened One, Founder of Dhamma
Historical Setting & Context:

Delivered in the town of Sedaka in the Sumbha country, illustrating with the simile of the acrobats how personal mindfulness and social compassion are mutually dependent.