God is perfectly just
All have sinned and fall short of the glory of God
God is also perfectly merciful
For God so loved the world, He gave His only son as a perfect sacrafice for our sins.
When God told Abraham to sacrafice his son Isaac, he was demonstrating this.
At the last minute though God saved Isaac and a ram was provided as a sacrafice instead.
God is both judge and redeemer.