Before the plague, God commanded Moses to inform all the Israelites to mark lamb's blood on the doorposts on every door in which the Angel of Death will pass over them sparing all the Israelite first-borns. This was the hardest and cruelest blow upon Egypt and the plague that finally convinced Pharaoh to submit, and let the Israelites go.
After this, Pharaoh, furious and saddened, ordered the Israelites to go away, taking whatever they wanted. The Israelites didn't hesitate; and at the end of that night Moses led them out of Egypt with "arms upraised."