For any regular Courant algebroid, we construct a characteristic class à la Chern-Weil. This intrinsic invariant of the Courant algebroid is a degree-3 class in its naive cohomology. When the Courant algebroid is exact, it reduces to the Ševera class (in H DR(M)). On the other hand, when the Courant algebroid is a quadratic Lie algebra g, it coincides with the class of the Cartan 3-form (in H(g...