The behavior that is both a courtship and territorial behavior is:
creating a bower (arch) with interesting objects and defending it from rival males.
This behavior involves attracting mates while also defending a space against other males, thereby serving both purposes.