Be (have) a close call

Come within an inch of one's life / Dodge the bullet / Be a close shave / Be a narrow escape


Scamparla bella

Scamparla per un capello / Scamparla per un pelo / Scamparla per miracolo


Meanings
Fig.: to avoid a dangerous or negative situation

Examples
You can thank your lucky star you went out, because your landlord came asking for your overdue rent. You really had a close call!
Fortuna che eri uscito perché è venuto il tuo padrone di casa a chiedere l'affitto scaduto. L'hai scampata bella!

I was walking in Venice when I twisted my ankle and fell on the pavement. I really had a close call because the Gand Canal was less than two feet away
Camminavo tranquillamente a Venezia, quando mi sono slogata una caviglia e sono caduta. L'ho proprio scampata bella, perché il Canal Grande era a meno di mezzo metro

"Did you get hit by the tropical storm in Mexico?" "We dodged the bullet. It hit 50 miles north of us, we got strong wind but not much rain"
"Vi ha colpiti la tempesta tropicale in Messico?" "No. L'abbiamo scampata. Ha toccato terra 50 miglia a nord e noi abbiamo avuto un fortissimo vento ma relativamente poca pioggia"

When, the day before our wedding, I found out that my bride-to-be had already been married and had eight kids, I called the wedding off. Boy, that was a narrow escape!
Quando ho scoperto, il giorno prima del matrimonio, che la mia futura moglie era già stata sposata e aveva otto figli, ho annullato le nozze. L'ho proprio scampata per un pelo!

The car flew over the guardrail and went down the ridge. Luckily the two passengers were not seriously injured. They can say they came within an inch of their lives
L'auto ha scavalcato il guardrail ed è finita giù per la scarpata, ma i due occupanti ne sono venuti fuori con ferite lievi. Possono dire di averla scampata proprio per miracolo

Origin
The expression Have a close call goes back to the late 19th century and comes from the world of sport. The (close) call at issue is a referee's decision that could have gone either way