The work focuses on the diagnostic step of the error recovery process in manufacturing systems and formalizes an algorithm for constructing and pruning a failure propagation tree. The methodology of building a failure propagation tree is proposed and is based on a hierarchical process plan, a precondition-postcondition model of manufacturing operations, and a classification of the failure reasons. Given a hierarchical process plan and a precondition-postcondition model of manufacturing operations, the system builds a failure propagation tree by first substituting each operation in the process plan tree with the corresponding operation model. The result is a hierarchical operation model. The hierarchical operation model embodies the process plan, and the functional and structural classifications for each failure reason of every operation in the model. Based upon the hierarchical operation model, the final failure propagation tree is generated or expanded by linking the operations in the model. The expansion process is accomplished by iteratively applying the expansion rule and priority rule to the operations in the hierarchical operation model. In order to reduce the computation effort, some methods for pruning a failure propagation tree during its construction are developed. The algorithm for constructing and pruning a failure propagation tree will be presented and an example will be given.