An Italian journalist detained in Iran since December 19 and whose fate became intertwined with that of an Iranian engineer wanted by the United States has been freed and is heading home, officials announced.