4. Given a right triangle $ABC$ with a right angle at $A$. On the leg $AC$, a point $D$ is marked such that $AD: DC = 1: 3$. Circles $\Gamma_{1}$ and $\Gamma_{2}$ are then constructed with centers at $A$ and $C$ respectively, passing through point $D$. $\Gamma_{2}$ intersects the hypotenuse at point $E$. Circle $\Gamma_{3}$ with center $B$ and radius $BE$ intersects $\Gamma_{1}$ inside the triangle at a point $F$ such that angle $AFB$ is a right angle. Find $BC$ if $AB = 5$.

(P. D. Mulyenko)