spite fence

Definition from Nolo’s Plain-English Law Dictionary

An unsightly fence erected for no other purpose than to irritate a neighbor. Such a fence may be illegal under local fence height and appearance regulations or state laws that specifically bar spite fences. Even if it doesn't violate regulation or laws, the fence may still be illegal if it was built with malicious intent.

Definition provided by Nolo’s Plain-English Law Dictionary.