Valmiki Ramayana Yuddha Kanda Sarga 106 Shloka 12
Original Shlokaमयातुहितकामेवयशश्चपरिरक्षता । स्नेहप्रसन्नमनसाहितमित्यप्रियंकृतम् ।।6.106.12।।
1 source checked for this shloka
हितकामेन wishing your welfare, यशश्च fame, परिरक्षता to protect, स्नेहप्रसन्नमनसा with friendly and pleasant feeling, मया by me, हितम् इति that which is good for you, अप्रियम् unpleasant, कृतम् action
Wishing your welfare, for your fame and to protect you with a friendly and pleasant feeling I did that which is good for you. You are unpleasant about this action.