Jabo Ibehre's double spared Carlisle's blushes as a late rampage saw them beat St Albans 5-3 to reach the FA Cup second round.
Junior Morias scored twice for the hosts, but Danny Grainger and Jason Kennedy helped turn the contest on its head.
Ibehre's brace and a Reggie Lambe strike added gloss to the scoreline before Louie Theophanous pulled one back in the closing stages as the hosts slipped out of the cup.
Morias opened the scoring for the National League South side with a stunning 30-yard strike within five minutes before Grainger's penalty levelled proceedings after a foul on Charlie Wyke.
Kennedy's near-post header sent the League Two side ahead but Morias fired home after a neat turn to level.
Ibehre then effectively ended the contest, twice heading home from crosses to make it 4-2 heading into the closing stages.
The 33-year-old striker had a chance for a hat-trick too but, with his shot saved by James Russell, Lambe was on hand to tuck in the rebound.
Theophanous' late volley gave St Albans hope but it was not enough to avoid defeat in the eight-goal thriller.
English FA Cup News
Sadio Mane wins Senegal showdown, Taiwo Awoniyi ends season in style
Sadio Mane and Mohamed Salah weren't at their best but they and Joel Matip and Naby Keita added their names to the list of African FA Cup winners.
Jake Daniels: I'm ready to be myself
Jake Daniels speaks about his decision to come out as the UK's only openly gay active male professional footballer.
Man City keep Premier League title in reach, Liverpool win FA Cup, Lewandowski wants out of Bayern
Man City rallied to remain on course for PL glory with one week left. PLUS: Liverpool won another trophy and Bayern prepare for a stressful summer.
What's still at stake for Africa's stars in Europe?
African players in Europe's top divisions find themselves in the midst of the fray as the 2021-22 season fast approaches its conclusion.
Romelu Lukaku was meant to solve Chelsea's striker issues. After another FA Cup loss, what should the club do?
Chelsea's FA Cup final loss to Liverpool -- their third straight in the competition -- can partly be blamed by a lack of goals from up top.
Chelsea's Thomas Tuchel says sanctions will make it harder to close the gap to Liverpool
Thomas Tuchel admitted that government sanctions are affecting Chelsea's ability to close the gap on Liverpool following their FA Cup final loss.