If the encroachment is denied, and the owner or occupant of the land, or the person causing, owning or controlling the alleged encroachment refuses either to remove it or permit its removal, the road commissioner shall commence, in a court of competent jurisdiction, an action in the name of the county to abate the encroachment as a nuisance. If the commissioner recovers judgment he or she may, in addition to having the nuisance abated, recover a penalty of three hundred fifty dollars ($350) for each day the nuisance remains after service or posting of notice, and also the costs in the action, as provided in Section 1496.