[en] Let $X$ be a nonempty set. Denote by $\mathcal{F}^n_k$ the class of associative operations $F\colon X^n\to X$ satisfying the condition $F(x_1,\ldots,x_n)\in\{x_1,\ldots,x_n\}$ whenever at least $k$ of the elements $x_1,\ldots,x_n$ are equal to each other. The elements of $\mathcal{F}^n_1$ are said to be quasitrivial and those of $\mathcal{F}^n_n$ are said to be idempotent. We show that $\mathcal{F}^n_1=\cdots =\mathcal{F}^n_{n-2}\subseteq\mathcal{F}^n_{n-1}\subseteq\mathcal{F}^n_n$ and we give conditions on the set $X$ for the last inclusions to be strict. The class $\mathcal{F}^n_1$ was recently characterized by Couceiro and Devillet \cite{CouDev}, who showed that its elements are reducible to binary associative operations. However, some elements of $\mathcal{F}^n_n$ are not reducible. In this paper, we characterize the class $\mathcal{F}^n_{n-1}\setminus\mathcal{F}^n_1$ and show that its elements are reducible. We give a full description of the corresponding reductions and show how each of them is built from a quasitrivial semigroup and an Abelian group whose exponent divides $n-1$.