Well, in all honesty, I am not sure if I could have attacked back at that moment, since I was on my alt and not paying attention to my main. However, my alt was also attacked and survived by using invul, by the time the pvp clock (approx. 30 secs) had lapsed the marauder in question was no longer pvp. This is gaming the system, not rping. There is no reason a marauder should be able to camp out by a city without either the guards or the citizens being able to attack.
Have you tried reporting your inability to attack back as a bug?