وَإِذْ أَنجَيْنَـٰكُم مِّنْ ءَالِ فِرْعَوْنَ يَسُومُونَكُمْ سُوٓءَ ٱلْعَذَابِ ۖ يُقَتِّلُونَ أَبْنَآءَكُمْ وَيَسْتَحْيُونَ نِسَآءَكُمْ ۚ وَفِى ذَٰلِكُم بَلَآءٌ مِّن رَّبِّكُمْ عَظِيمٌ Qur’an Al-A'raf (7:141)Waith anjaynakum min ali firAAawna yasoomoonakum sooa alAAathabi yuqattiloona abnaakum wayastahyoona nisaakum wafee thalikum balaon min rabbikum AAatheemun
Cf. 2:49 . It appears that this passage is part of Moses' reminder to his people (Manar IX, 115 ff.); I have brought this out by interpolating "he reminded them of this word of God" between brackets.
This is Allah's reminder to Israel through the mouth of Moses. There was a double trial: (1) while the bondage lasted, the people were to learn patience and constancy in the midst of affliction: (2) when they were rescued, they were to learn humility; justice, and righteous deeds of prosperity.