This paper proposes a compositional method for verifying the safety of a dynamical system, given as an interconnection of subsystems. The safety verification is conducted by the use of the barrier certificate method; hence, the contribution of this paper is to show how to obtain compositional conditions for safety verification.We show how to formulate the verification problem, as a composition of coupled subproblems, each given for one subsystem. Furthermore, we show how to find the compositional barrier certificates via linear and sum of squares programming problems.The proposed method makes it possible to verify the safety of higher dimensional systems, than the method for centrally computed barrier certificates. This is demonstrated by verifying the safety of an emergency shutdown of a wind turbine.