An ambush or locked battle is an occurrence where a side-scrolling level prevents the player from continuing forward and locks in place, spawning several enemies and forcing the player to to defeat them. Only once all of the enemies are defeated can the player can resume advancing through the level. Ambushes prevent players from simply speeding through every level without engaging any enemies.
Ambushes first appeared in Melee's Adventure Mode, being present in three stages: Mushroom Kingdom, where the player must defeat the Yoshi Team halfway through; the Underground Maze, where the player must defeat Link when passing through any room that contains the Master Sword instead of the stage-clearing Triforce; and Infinite Glacier, where the player must defeat a team of two Ice Climbers after having survived traversing Icicle Mountain for a sufficient period of time.
Ambushes became considerably more common in Brawl's Subspace Emissary, with every side-scrolling level except Subspace (Part I) and The Great Maze containing at least one ambush. These can be somewhat identified ahead of time by the sudden appearance of an isolated large solid platform with smaller platforms above, similar to the layout of Battlefield. Upon occurring, the screen will flash purple with a distinctive sound, followed by a series of enemies appearing on the aforementioned specially-designed part of the level; a slightly darker border will also appear around the screen. When an ambush ends, the screen flashes white with another distinctive sound, and the player usually receives a reward of some sort, often in the forms of stickers, though recovery items and trophies can also potentially be awarded. Certain non-side-scrolling stages - namely Midair Stadium, The Battlefield Fortress, The Canyon, Outside the Ancient Ruins, and The Subspace Bomb Factory II - have situations similar to ambushes except that the battle takes up an entire part of the level, instead of being a blockade in the middle of a level. These ambushes generally have a higher enemy count, alongside an extra display on the screen showing exactly how many more enemies remain. The Canyon is made up entirely of an ambush, and is the only level to consist of such.
Ambushes can also happen in certain areas of the Smash Run map in Super Smash Bros. for Nintendo 3DS. When ambushes occur, the player is tasked with defeating a number of enemies within a period of time; if they defeat the enemies before the timer runs out, they will receive stat boosts, as well as other potential rewards, such as trophies. Failing to defeat all the enemies within the time limit will not grant any bonuses; the enemies will simply vanish, leaving the player to continue.
A sole stage exists in Adventure Mode: World of Light that has ambushes. The final battle begins with a long upward scrolling segment that locks at several points for ambushes against Puppet Fighters.