After the First World War he became Italian foreign minister under Giovanni Giolitti. In 1921 Sforza upset nationalist right-wing forces by signing the Rapallo Treaty which recognised the important port of Fiume as a free city. As minister of Foreign Affairs he was instrumental in breaking the proto-fascist feud led by poet Gabriele D'Annunzio in Fiume.