Upacala Defeats Mara
This poem is from the Therigatha. The Therigatha preserves 73 poems of elder nuns and is the ninth section in the Khuddaka Nikāya. The Khuddaka Nikāya is a collection of short texts in (mostly) verse. The Khuddaka Nikāya is the last Nikaya (collection) of the Sutta Piṭaka, the second book of the Pāli Canon.
Here, Upacala teaches how she has overcome suffering by establishing refined mindfulness and gaining insight into impermanence, not-self, and suffering through developing to its culmination the Eightfold Path. [1,2]
Mara is metaphor for a mind rooted in ignorance and prone to confusion, deluded thinking, and ongoing unsatisfactory experiences. 
The links below to further study show the depth of understanding presented here.
Upacālā Defeats Mara
Established in mindfulness, having developed Right View,
I have entered the peaceful state,
of which those ignorant (of FourTruths) 
Ignore those truths,
and enjoy sensual pleasures,
delight in sensual pleasures.
Don’t later burn with regret.
One who gives birth to ignorance,
clinging to impermanence,
clinging to ignorant views, (of self)
suffers, and suffers more.
The Rightly Self-Awakened one,
has defeated Mara.
He taught me his Dhamma,
for the cessation of ignorance,
the cessation of fabrications. 
He taught me the Eightfold Path,
for final cessation of suffering.
I heard the great teachers words,
I am delighted in his bidding.
Insight into the Three Marks is known,
I have done what must be done.
Craving has ended,
Know this, evil one, (Mara)
you have been defeated!
End of Poem
For All Who Reside In The Dhamma - Agantuka Sutta
Becoming-Buddha.com is free of advertising and ad-tracking. I rely on donations to support the continued restoration, preservation and clear and accessible presentation of the Buddha's authentic Dhamma.
If you find benefit here please:
My Dhamma articles and talks are based on the Buddha's teachings (suttas) as preserved in the Sutta Pitaka, the second book of the Pali Canon. I have relied primarily on Thanissaro Bhikkhu’s excellent and insightful translation of the Pali generously made freely available at his website Dhammatalks.org, as well as the works of Acharya Buddharakkhita, Nyanaponika Thera, John Ireland, Maurice Walsh, Hellmuth Hecker, and Sister Khema, among others, as preserved at Access To Insight.
Also, I have found Bhikkhu Bodhi's translations from Wisdom Publications Pali Canon Anthologies to be most informative and an excellent resource.
I have made edits to the suttas from these sources for further clarity, to modernize language, to minimize repetition, and maintain contextual relevance to Dependent Origination and Four Noble Truths.
Becoming-Buddha.com and Dhamma articles and recordings by John Haspel are licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.