A stepfather can win the custody of a child over the biological father.
Yes, that is legally possible in Kenya, especially if the minor's mother dies.
Many believe biological relations give people an advantage in the case of a fight for the custody of children.
While that is also true, the law provides circumstances under which a court can hand a stepfather the sole custody of a child over the minor's biological father.