How can I babyproof this deathtrap?

We are moving into our new place on the third floor next week. There's a staircase right next to our entrance, and I have just noticed how unsafe it is. The gap is 14 cm / 5.5 inches.

Any ideas??