In this paper we present an efficient approach for the fault detection of discrete event systems using Petri nets. We assume that some of the transitions of the net are unobservable, including all those transitions that model faulty behaviors. We prove that the set of all possible firing sequences corresponding to a given observation can be described as follows. First a set of basis markings corresponding to the observation are computed together with the minimal set of transitions firings that justify them. Any other marking consistent with the observation must be reachable from a basis marking by firing only unobservable transitions. For the computation of the set of basis markings we propose a simple tabular algorithm and use it to determine a basis reachability tree that can be used as a diagnoser.