Marega opened the scoring in the 26th minute from the penalty spot to register his third goal of the season after Manuel Fernandes had earlier missed a similar chance to put the home team in front.
Hector Herrera added the second nine minutes later after benefitting from Jesus Corona’s assist. The two-goal lead was shortlived as Anton Miranchuk halved the deficit in the 38th minute.
Corona got a goal of his own two minutes after the break with an assist from the Algeria international to seal the victory.
The Red-Greens were reduced to 10 men in the 76th minute following the expulsion of Solomon Kverkveliya.
Marega featured from start to finish while Brahimi was replaced by Adrian Lopez with eight minutes left on the regular time.
The win helped Porto continue their lead in Group D with seven points from three games and they will be hoping to secure yet another positive result in the return fixture on November 6 at Estadio Do Dragao to brighten their chances of progressing to the knock-out stages of the tournament.