Valmiki Ramayana Yuddha Kanda Sarga 18 Shloka 27
Original Shlokaआर्तोवायदिवादृप्तःपरेषांशरणांगतः । अरिःप्राणान्परित्यज्यरक्षितव्यःकृतात्मना ।।6.18.27।।
1 source checked for this shloka
कृतात्माना one's own self, परेषाम् an enemy, शरणम् protection, गतः comes, अरिः enemy, आर्तोवा or one who is struck by suffering, यदिवा whoever he be, दृप्तः arrogant, प्राणान् life, परित्यज्य giving up, रक्षितव्यः should be protected.
An enemy who comes for protection against another enemy should be protected, even giving up one's own life whoever he may be, even if he is afflicted or arrogant.