  For commutative rings with identity, we introduce and study the concept of
semi $r$-ideals which is a kind of generalization of both $r$-ideals and
semiprime ideals. A proper ideal $I$ of a commutative ring $R$ is called semi
$r$-ideal if whenever $a^{2}\in I$ and $Ann_{R}(a)=0$, then $a\in I$. Several
properties and characterizations of this class of ideals are determined. In
particular, we investigate semi $r$-ideal under various contexts of
constructions such as direct products, localizations, homomorphic images,
idealizations and amalagamations rings. We extend semi $r$-ideals of rings to
semi $r$-submodules of modules and clarify some of their properties. Moreover,
we define submodules satisfying the $D$-annihilator condition and justify when
they are semi $r$-submodules.
