  Let $F \in \mathbb Z[x, y]$ be an irreducible binary form of degree $d \geq
7$ and content one. Let $\alpha$ be a root of $F(x, 1)$ and assume that the
field extension $\mathbb Q(\alpha)/\mathbb Q$ is Galois. We prove that, for
every sufficiently large prime power $p^k$, the number of solutions to the
Diophantine equation of Thue type $$ |F(x, y)| = tp^k $$ in integers $(x, y,
t)$ such that $\gcd(x, y) = 1$ and $1 \leq t \leq (p^k)^\lambda$ does not
exceed $24$. Here $\lambda = \lambda(d)$ is a certain positive, monotonously
increasing function that approaches one as $d$ tends to infinity. We also prove
that, for every sufficiently large prime number $p$, the number of solutions to
the Diophantine equation of Thue-Mahler type $$ |F(x, y)| = tp^z $$ in integers
$(x, y, z, t)$ such that $\gcd(x, y) = 1$, $z \geq 1$ and $1 \leq t \leq
(p^z)^{\frac{10d - 61}{20d + 40}}$ does not exceed 1992. Our proofs follow from
the combination of two principles of Diophantine approximation, namely the
generalized non-Archimedean gap principle and the Thue-Siegel principle.
