On 18 January 2016 it was announced that Safari would return to Malmö FF when his contract with FC Basel expired at the end of the 2015–16 season. Safari signed a contract with Malmö that extends over the 2020 season and allows him to join the team halfway through the 2016 season. He scored a goal in the Allsvenskan on 11 April 2017 against GIF Sundsvall and was named vice-captain after Markus Rosenberg. He won his tenth league title after winning the 2017 Allsvenskan, making Zlatan Ibrahimović the only Swede with more league titles. Safari became a regular starter for MFF as they qualified for the 2018–19 UEFA Europa League on 30 August 2018. On 28 September 2020, Safari announced that he would retire from professional football after the 2020 season. On 8 November 2020, Safari and Malmö won the 2020 Allsvenskan. Safari played his final professional match on 6 December 2020 in a 4–0 win over Östersund, raising the Lennart Johansson Trophy afterwards and receiving a tribute from the likes of Walter Samuel and Roger Federer.