Ask what saved Noah, and most people will say the ark, thinking that the danger from which he needed saving was the water. But Peter says that the water saved that ancient preacher of righteousness, with his family, because the danger was that perverse generation, and the water separated them from it. As real as that salvation was, so is baptism, and so it saves us from our sins.
20 after they were disobedient long ago when God patiently waited in the days of Noah as an ark was being constructed. In the ark a few, that is eight souls, were delivered through water. 21 And this prefigured baptism, which now saves you – not the washing off of physical dirt but the pledge of a good conscience to God – through the resurrection of Jesus Christ, 22 who went into heaven and is at the right hand of God with angels and authorities and powers subject to him. (1 Peter 3:20-22 NET)