Let be a given set of generators for a group G, where V is a finite-dimensional vector space over a finite field . We present an algorithm which recognises, constructively, when G is Sp(V), SU(V) or . Our algorithm handles all of those classical groups uniformly and runs in time which is polynomial in the input length, assuming a discrete logarithm oracle for .