out of spite
Done because of one's own spiteful, vengeful, or malicious feelings or intentions. The disgruntled postal worker stole hundreds of people's private letters after being fired and began posting them online out of spite. The judge and I had an argument a few years ago, so I think she's overruling my objections today just out of spite.
out of spite
with the desire to harm someone or something. Jane told some evil gossip about Bill out of spite. That was not an accident! You did it out of spite.