Simon Humberstone's late penalty earned Pontypridd a dramatic victory over Cornish Pirates to secure a place in the British and Irish Cup semi-finals.
Aaron Carpenter's try and three successful penalties from Kieran Hallett looked like being enough to see the Pirates home at the interval.
Pontypridd dominated the second half and Liam Belcher crossed for a try in the final 10 minutes.
Humberstone converted before securing victory with a last-gasp penalty.
Pontypridd will host Leinster A in the semi-final at Sardis Road at the end of the April, with the winners facing Bristol or Leeds Carnegie in the final.
Cornish Pirates: Goss, Moyle, Riley, Fatialofa, Holland, Hallett, Kessell, Andrew, Elloway, Prescott, McGlone, D. Barry, Morgan, Cheesman, Carpenter.
Replacements: Channon, Cahill, Graulich, Conlon, Parker, James, Bodilly.
Pontypridd: Walsh, L. Williams, G. Smith, Lockyer, O. Jenkins, Humberstone, T. Williams, Howe, Belcher, K. Jenkins, Locke, Sieniawski, O'Connor, Shellard, Godfrey.
Replacements: L. Williams, Flanagan, Nuthall, Hetherington, Normandale, Crocker, Phillips.