In a manner that is unpleasant or offensive. He spoke nastily to his colleague, causing tension in the office.
In a way that is spiteful or malicious. She nastily spread rumors about her rival to damage her reputation.
In a way that is physically harmful or dangerous. The storm nastily uprooted trees and damaged houses in the neighborhood.