This paper is concerned with the study of a class of closed linear operators densely defined on a Hilbert space $H$ and called B-Fredholm operators. We characterize a B-Fredholm operator as the direct sum of a Fredholm closed operator and a bounded nilpotent operator. The notion of an index of a B-Fredholm operator is introduced and a characterization of B-Fredholm operators with index $0$ is given in terms of the sum of a Drazin closed operator and a finite-rank operator. We analyse the properties of the powers $T^m$ of a closed B-Fredholm operator and we establish a spectral mapping theorem.