Falkirk got the better of local rivals Stenhousemuir to reach the third round of the Scottish Communities League Cup.
Eric Paton's 25th-minute free kick from the edge of the penalty box gave Stenny the lead.
But the match turned on its head when Bairns levelled through Brown Ferguson's own goal and then took the lead thanks to Craig Sibbald's strike.
And Farid El Allagui made sure of the hosts' victory with a lobbed shot in stoppage time.
Paton threatened with an early free-kick that was tipped onto the crossbar by Falkirk goalkeeper Michael McGovern.
But the midfielder was more successful with his next set piece to give the visitors the lead.
Falkirk came out for the second half determined to turn the match around and were level by the 47th minute as Kallum Higginbotham's dangerous cross was diverted past Alistair Brown by the unfortunate Ferguson.
And it was from another Higginbotham delivery two minutes later that Sibbald finished coolly to claim his first Falkirk goal.
Stenny chased an equaliser but were undone in injury time as El Allagui grabbed his sixth goal of the season.