Vjekoslav Budimirović, Branimir Šešelja Abstract. If p ∈ N , then a p-semigroup, introduced in , is a generalization of the notion of an anti-inverse semigroup . A similar notion is a p-semiring. The aim of the paper was to investigate the closeness of classes of these algebras under the operators H (homomorphisms), S (subalgebras) and P (direct products). It is proved that for every p ∈ N each of these classes is closed under H and P . Conditions under which closeness under S also hold are presented. It turns out that for p even or p = 4k + 3 both the class of p-semigroups and the one of p-semirings are varieties. The corresponding identities are presented.