couldn't help it
Said in regards to something that one has done because it felt irresistible or was unavoidable. Well, as soon as he said not to push the button, I just had to push the button—I couldn't help it! A: "Did you burn the bread?" B: "Ugh, yes, but I couldn't help it—the baby woke up from her nap at an inopportune moment."
(I) couldn't help it.
There was no way I could prevent it.; I was unable to prevent something from happening.; I was unable to control myself. Sally: You let the paint dry with brush marks in it. Mary: I couldn't help it. The telephone rang. Fred: You got fingerprints all over the window. Mary: Sorry. Couldn't help it.