  The paper deals with an extremal problem for bounded harmonic functions in
the unit ball of $\mathbf{R}^4$. We solve the generalized Khavinson problem in
$\mathbf{R}^4$. This precise problem was formulated by G. Kresin and V. Maz'ya
for harmonic functions in the unit ball and in the half--space of
$\mathbf{R}^n$. We find the optimal pointwise estimates for the norm of the
gradient of bounded real--valued harmonic functions.
