"And when We saved you from the people of Pharaoh, who were afflicting you," meaning: subjecting you to "the worst of the torment," meaning: the most severe of it. "They were slaughtering your sons and letting your women live," meaning: they would not kill them. "And in that was a great trial from your Lord," meaning: when He saved you from it.
Muhammad said: The term 'bala' (trial) is used in transmission with various meanings; and here, it means a blessing.