The following are reportedly Gaddafi's last words:
"What you're doing is wrong, guys. What you're doing is wrong. Do you know what is right or wrong? What are you doing? It's haraam [forbidden]. It's not allowed in Islamic law. Haraam. What you are doing is forbidden in Islam!"
I am not a Muslim myself, and I am therefore not qualified to judge what is, or is not, forbidden in Islam. Others here are far more qualified then myself to comment on this.
I however know that the Arabic word "Shahid", which is usually translated as "martyr", has exactly the same origin as the Greek word martys (μάρτυς) - it means witness.
The Christian tradition holds that no matter how evil or sinful your life has been, you can redeem it until your last breath by becoming a martyr, a witness of God's truth. If "Islam" means "submission to God" then Gaddafi's last words were "what you are doing is forbidden to those who submit to God". That is, of course, true and even though I never had any sympathy for Gaddafi, I recognize that his last words were a true witness to God, addressed not only to the screaming lunatics who beat him to death, but also to the leader of the pseudo-Christian Western world who allowed them to take power in Libya (and in many other countries).
For those who can stomach the image of a 69 year old man being lynched, you can see evidence of this crime in the following sites: