The Italy great had become the Hammers’ first overseas-born manager in September 2008.
Striker will play his final game at Parc des Princes on Sunday before completing an expected move to the Spanish champions
The goalkeeper Max Stryjek was the hero with two saves in the shootout after Crewe cancelled out a two-goal first-leg deficit to progress