  We develop a theory of stated SL(n)-skein modules, $S_n(M,N),$ of 3-manifolds
$M$ marked with intervals $N$ in their boundaries. They consist of linear
combinations of $n$-webs with ends in $N$, considered up to skein relations
inspired by the relations of the Reshetikhin-Turaev theory.
  We prove that cutting $M$ along a disk resulting in a $3$-manifold $M'$
yields a homomorphism $S_n(M)\to S_n(M')$. That result allows to analyze the
skein modules of $3$-manifolds through the skein modules of their pieces.
  The theory of stated skein modules is particularly rich for thickened
surfaces $M=\Sigma \times (-1,1),$ in whose case, $S_n(M)$ is an algebra,
denoted by $S_n(\Sigma).$ We prove that the skein algebra of the ideal bigon is
$O_q(SL(n))$ and that it provides simple geometric interpretations of the
product, coproduct, counit, the antipode, and the cobraided structure on
$O_q(SL(n)).$
  Additionally, we show that a splitting of a thickened bigon near a marking
defines a $O_q(SL(n))$-comodule structure on $S_n(M),$ or dually, an
$U_q(sl_n)$-module structure. Furthermore, we show that the skein algebra of
surfaces $\Sigma_1, \Sigma_2$ glued along two sides of a triangle is isomorphic
with the braided tensor product $S_n(\Sigma_1)\underline{\otimes}
S_n(\Sigma_2)$ of Majid. These results allow for a geometric interpretation of
further concepts in the theory of quantum groups, for example, of the braided
products and of Majid's transmutation operation.
  We prove that the factorization homology of surfaces with coefficients in
$Rep\, U_q(sl_n)$ is equivalent to the category of left modules over
$S_n(\Sigma)$. We also discuss the relation with the quantum moduli spaces of
Alekseev-Schomerus.
  Finally, we show that for surfaces $\Sigma$ with boundary, $S_n(\Sigma)$ is a
free module with a basis induced from the Kashiwara-Lusztig canonical bases.
