Martins fired the fourth-quickest goal in the tournament's history, netting in 26 seconds, before a late flurry saw substitute Nuno Santos set up Andre Silva, then add another of his own.
That opening goal was a real team effort. Senegal kicked off but great pressing by Portugal saw the Africans forced into a mistake and the ball feel at the feet of Silva. His slide-rule pass picked out Martins and though Ibrahima Sy closed down the Sporting forward, he was left powerless as the shot looped into the top corner.
While the balance of play was fairly equal, the quality of chances was not. Portugal always looked the more likely to register next, Goncalo Guedes firing over before Joao Nunes followed suit after some fine skill. Silva tested Sy again before turning provider, with a slick one-two setting Riquicho up for a thunderous volley which the Lorient keeper dealt with impressively.
Both started the second half in a lively fashion, but Senegal continued to lack incisiveness. A delightful dummy from Guedes left Raphael Guzzo in space to rattle the bar from 25 yards. The latter's cross then set up Silva for a smart volley, but Sy was equal again.
The man between the Senegalese sticks was increasingly responsible for keeping Joseph Koto's side in the running, typified when he clawed out Silva's volley after the unmarked Porto starlet looked certain to score.
Portugal continued to waste chances, Martins, Rafa and Chico Ramos all coming close, but the introduction of Santos changed everything. Firstly his cross picked out the dangerous Silva, who finally got his goal with a stunning header, before a moment of madness by Sy – racing out of his area – allowed the substitute to chip home a third from 35 yards.