The behavior that is both territorial and used for courtship is:
sparring or wrestling using antlers or horns.
This type of behavior is often seen in certain species of animals, such as deer, where males will engage in combat to establish dominance and attract mates while also defending their territory.