Inter's Champions League hopes received a huge boost with a late comeback and a 3-1 win against rivals Lazio in Serie A.
Felipe Anderson had given the visitors a first-half lead at San Siro, robbing Francesco Acerbi of possession and dispatching past Andre Onana.
Numerous chances for an equalizer went begging for the hosts in the second half, which looked set to result in yet another home loss for the Nerazzurri.
However, Martinez smashed home a leveller after 77 minutes, with Robin Gosens putting his side ahead before Martinez added further gloss to the scoreline in a rallying finish from Simone Inzaghi's men.
The hosts were the stronger of the two sides early on, Henrikh Mkhitaryan proving to be an effective attacking outlet, tucking home after Joaquin Correa's cutback, though his celebrations were cut short by an offside flag.
Lazio swiftly responded, taking the lead on the half hour mark through Anderson who won possession from Acerbi and exchanged a neat one-two with Luis Alberto before slotting beneath Onana.
The Cameroonian needed to be alert to prevent Lazio from extending their lead before the break, parrying Ciro Immobile's low drive away from the far corner, then collecting Alessio Romagnoli's header from point-blank range from the following corner.
Inter pushed for an equalizer immediately after the restart, Nicolo Barella volleying a fierce strike agonizingly wide of the post, though Lazio remained a threat and Onana had to keep Alberto's fine effort at bay.
A late comeback soon turned the match on its head, Martinez latching onto Romelu Lukaku's inviting pass and smashing home, before Lukaku was again the provider by floating a cross to the far post that Gosens volleyed in.
There was still time for further celebration, Martinez pouncing on Matias Vecino's loose back pass and bearing down on goal, securing his brace at the second attempt after his initial effort was saved.