The barrier coverage model was proposed for applications in which sensors are deployed for intrusion detection. In this paper, we study a strong barrier coverage problem in wireless sensor networks with directional sensors. First, we introduce the directional coverage graph to model barrier coverage with directional sensors. Based on this graph model, we present an integer linear programming formulation for the barrier coverage problem, which can be used to provide optimal solutions. Moreover, we present efficient centralized algorithms and a distributed algorithm to solve the problem. It has been shown by simulation results that the proposed algorithms provide close-to-optimal solutions and consistently outperform a simple greedy algorithm.