Part-time Isthmian Premier League side Hornchurch stunned National League Notts County on penalties to reach the FA Trophy final at Wembley after a dramatic 3-3 draw.
But a Lewwis Spence shot and two strikes by Liam Nash, the second in injury-time, forced spot-kicks.
And Chris Dickson struck the decisive penalty to set up a Wembley date with Hereford, who beat Woking 1-0.
Joey Butlin’s 21st-minute header was enough for National League North side Hereford to see off their National League opponents and ensure they will meet Hornchurch at Wembley on Saturday, 22 May.
The Urchins had a much more complicated path through their last-four tie with Notts at Meadow Lane, having trailed to Kyle Wootton’s early header and then again to strikes by Ruben Rodrigues and Elisha Sam.
But Nash netted in the 91st minute to ensure the drama continued into spot-kicks.
The first six penalties were scored, but Joe Wright saved from Jake Reeves before successful efforts by Rickie Hayles and Dickson saw the visitors through.