  We obtain an asymptotic formula for the average value of the divisor function
over the integers $n \le x$ in an arithmetic progression $n \equiv a \pmod q$,
where $q=p^k$ for a prime $p\ge 3$ and a sufficiently large integer $k$. In
particular, we break the classical barrier $q \le x^{2/3}$ for such formulas,
and generalise a recent result of R.~Khan (2015), making it uniform in $k$.
