A free-kick in the 110th minute from Chris Casement sealed Portadown's progress into the sixth round of the Irish Cup, but they were made to work hard by Championship One side PSNI.
The Ports had looked on course for a routine victory, when striker Gary Twigg fired them into a 7th-minute lead in South Belfast.
However, the struggling second tier outfight fought back and deservedly levelled proceedings eighteen minutes leader through the pacey Kyle Agnew, who had been making his debut after signing from Ballyclare Comrades.
The visitors dominated possession but the Police spurned numerous openings on the break which would have led to the shock of the round. Ronnie McFall's men eventually got over the line when Casement's fine free-kick flew into the corner, and Portadown breathed a sigh of relief.
The Ports now travel to Portstewart - the only remaining Championship Two side - in the last sixteen.
Highlights filmed and edited by Ports TV