  We establish the supercongruences for the fourteen rigid hypergeometric
Calabi--Yau threefolds over $\mathbb Q$ conjectured by Rodriguez-Villegas in
2003. Our first method is based on Dwork's theory of $p$-adic unit roots and it
allows us to establish the supercongruences between the truncated
hypergeometric series and the corresponding unit roots for ordinary primes. The
other method makes use of the theory of hypergeometric motives, in particular,
adapts the techniques from the recent work of Beukers, Cohen and Mellit on
finite hypergeometric sums over $\mathbb Q$. Essential ingredients in executing
the both approaches are the modularity of the underlying Calabi--Yau threefolds
and a $p$-adic perturbation method applied to hypergeometric functions.
