Evanilson opened the scoring for Porto in Estadio do Dragao in the 21st minute and Taremi doubled the advantage seven minutes later from the penalty spot.
Alex Mendez pulled a goal back in the 36th minute and Nuno Moreira leveled the scoreboard in the 48th minute.
Mbemba made it 3-2 in the 56th minute and with three minutes left, Taremi completed his brace to make the match 4-2.
With this win, Porto has almost won the 30th league crown.