Lassana Diarra and Jermain Defoe got the goals that gave Portsmouth victory in their first European match and a healthy advantage for the second leg.
Diarra played a one-two with Defoe and volleyed in to open the scoring.
Three minutes later Guimaraes had a chance to level but Joao Paulo Fajardo blazed a penalty over after Sol Campbell hauled down Felix Roberto.
After the break Defoe missed a penalty, having won it himself, but made amends with a superb volley to seal the win.
It was a deserved success for Pompey and in large part down to boss Harry Redknapp’s decision to revert to a 4-4-2 formation.