Genesis 42 - 45
When Jacob (Joseph's father) learned that Egypt had food despite the famine,
he sent 10 of his sons there to buy grain.
Joseph was in charge of the grain and his brothers came to him to buy some.
He recognized them, but pretended he did not know them and accused them
of being spies.
He then put them through several trials including prison, and sent one of
them back home to their father.
After more trials he finally revealed himself to his brothers and told them to
bring everybody back to Egypt including their father Jacob also known as Israel.