Portsmouth needed extra-time to secure a place in the group stages of the UEFA Cup at the expense of Portuguese outfit Vitoria Guimaraes.
Pompey trailed 2-0 after 90 minutes, but won through 4-2 on aggregate thanks to a Peter Crouch double in the extra 30 minutes.
Vitoria made a fast start to the game and soon had the FA Cup holders on the back foot, with Douglas scuffing an early chance straight at David James.
A penalty shout against Sylvain Distin was waived away as the home side continued to press and they hit the front with 19 minutes played.
A deep cross from the left was flicked on and Douglas took the ball down superbly before smashing a right-foot shot past James from ten yards out.
Just past the half-hour mark the aggregate scores were level at 2-2, as Joao Alves tried his luck with a free-kick from all of 35 yards and James was left rooted to the spot as the low drive skimmed into the corner of the net.
Alves then curled a left-foot effort just wide from 25 yards as the home side continued their dominance.
Right on the stroke of half-time Pompey almost hit back, with Glen Johnson drawing a fine stop from Nilson after cracking in a left-foot drive from 20 yards.
Portsmouth started the second half better than they had the first, with the home side seeming loath to push on in the way they had in the first 45 minutes.
On the hour mark the impressive Douglas tested James with a long-range drive, before the game began to slow in pace, with neither side able to forge any meaningful openings.
Nine minutes from time Armand Traore got to the byline on the left and hooked in a deep cross, but Crouch couldn't get enough power on the header to trouble Nilson and the tie headed into extra-time.
In the first period of extra-time James denied Alves with a superb close-range stop, shortly after Jermain Defoe had rippled the sidenetting with a shot from an acute angle.
Then, just before half-time, Johnson got away down the right and lofted the ball to the far post for Crouch to tower above his marker and plant a close-range header into the net.
Six minutes into the second period it was game over when Crouch got his second of the evening, smashing the ball home from 15 yards after fine approach work by sub Nadir Belhadj.