Surprise attacks

, or ambushes, are when zombies suddenly spawn during a stage via means other than entering the lawn from the right side. This happens in all of the stages, except for Day, Player's House, Wild West, Kongfu World, Neon Mixtape Tour, Jurassic Marsh, and Modern Day.

Plants vs. Zombies
The surprise attack zombies can also be referred to as Ambush Zombies and usually come in sets of three; They emerge from graves at Night, emerge from the pool in the Pool and Fog levels, and are dropped down by Bungee Zombies on the Roof (Night levels are the exception of the "come in sets of three" principle, as there are always more than three graves). The Ambush Zombies can be normal Zombies, Conehead Zombies, Buckethead Zombies, and their Ducky Tube Zombie forms, with the exception of Level 5-5 and its mini-game version.

Plants vs. Zombies 2
In Ancient Egypt, there are sometimes sandstorms. There will be a warning "Sandstorm!", Mummy Zombies will get pushed forwards through your defenses. They are vulnerable to attacks while they are part of these sandstorms, but they move extremely fast.

In the Pirate Seas, there is the "Raiding Party!", a large number of Swashbuckler Zombies will swing in and attack all at once. The swashbucklers are vulnerable to attacks and can be blown away. They first appeared in the 1.7 update.

In the Far Future, there is the "Bot Swarm!" warning, and many Bug Bot Imps will fall from the sky, they will take approximately one second to charge up after falling. If you react fast enough, the Bug Bots can be blown away. In the Summer Nights Piñata Party, it has the same functionality but with Summer Imps and they do not take time to charge up - they simply walk on forward.

In Dark Ages, there is "Necromancy!", and zombies rise from tombstones similar to the Night surprise attack from the first game.

In Big Wave Beach, the ambush is called "Low Tide!" where zombies covered in seaweed wash ashore, similar to the ambush zombies from Pool in Plants vs. Zombies, as they have seaweed on their head.

In Frostbite Caves, there is "Snowstorm!", which is the same as the "Sandstorm!" Surprise Attack in Ancient Egypt, except it can contain any sort of zombie from Frostbite Caves with the exception of Sloth Gargantuars and the sand is replaced by snow, hence the name.

In Lost City, there is the "Parachute Rain!," where Lost Pilot Zombies descend on the middle columns, they will stay there for a few seconds, eating any plant below them, then they will fall to the ground and start walking towards the house.

In the special St. Paddy's Day and Luck O' The Zombie Piñata Parties, a surprise attack occurred where Leprechaun Imps fell from the sky onto the lawn. It was called "Leprechauns!"

In Sky City, Missile Zombie and Transport Boat will appear occasionally.

Plants vs. Zombies

 * For Night ambush zombies, just use Grave Busters to destroy the graves before the final wave.
 * For Pool and Fog ambush zombies, when playing to the final wave, use an Ice-shroom right after the wave comes but before the ambush zombies pop up from the pool. This takes extremely good timing, but can stop the ambush zombies from ever emerging. If you cannot get the hang of this, another way to deal with them is to plant explosive plants in the middle of the ambush zombies.
 * In Fog, plant an Ice-shroom just when the words "Final Wave" appears, but in the pool, because of the mushrooms sleeping and the delay of the Coffee Bean effect, plant the Coffee Bean on an Ice-shroom just after the message "A huge wave of zombies is approaching!" disappears. Note that the Pool method will not work unless you completed Adventure Mode at least once or after you earned Coffee Bean.
 * For Roof ambush zombies, Umbrella Leaves will repel the Bungee Zombies trying to place them down, preventing the zombies from entering play.

Plants vs. Zombies 2

 * Use powerful plants like Pea Pods and Winter Melons to defeat Mummy Zombies while they are still in the sandstorms or use instant-kills if they get behind your defensive plants.
 * In the Pyramid of Doom, they can get as far as the third column from the left. When this happens, a Winter Melon with Plant Food or Guacodile can be very effective for dealing with the huge groups early on.
 * Bonk Choys can be especially effective against the Mummy Zombies, particularly when they're placed within a tile of where the sandstorm advances to, often killing them before their sandstorm even dies out, though the Bonk Choy will continue to uppercut the Mummy Zombie in question until it is released from the sandstorm.
 * Spring Bean is particularly effective against the Swashbuckler Zombies on most normal levels as it will often wake back up before the next wave.
 * The player can also plant Spikeweeds or Spikerocks on the Swashbuckler Zombies' landing tiles.
 * If timed correctly, a Blover can blow away falling Bug Bots and swinging Swashbuckler Zombies.
 * You can also use the E.M.Peach to disable Bug Bots if they fall before you can use Blover.
 * In Dark Ages, quickly use Grave Buster to remove the tombstones before the warning, "Necromancy!" shows up. This is especially important in Arthur's Challenge.
 * In Big Wave Beach, combine two Sweet Potatoes and two Guacodiles to deal multiple damage on zombies that spawn during Low Tide. You can also use Banana Launchers to kill almost every zombie, but be careful of Fisherman Zombies when zombies are spawned during the ambush.
 * In Frostbite Caves, use a Chard Guard or, after the effect ends, Hurrikale to prevent any of the ambush zombies from reaching your defenses, or you could use Primal Peashooter to stop the ambush.
 * In Lost City, avoid using Blovers against the "Parachute Rain" ambush unless there are many Bug Zombies or swinging Relic Hunter Zombies, as they will drop all Lost Pilot Zombies down immediately. Use some heavy attacking plants to take them out while they're in mid-air.

Plants vs. Zombies

 * Ambush zombies in Pool and Fog levels have seaweed on them.
 * The seaweed patterns are always random.
 * It is exactly unknown how the ambush zombies from Pool or Fog levels have seaweed on them. It is possible the pool could have algae in it, but that still did not explain the green clumps.
 * Maybe the seaweed could have came from the Tangle Kelp when they were pulled down, but the seaweed appeared before Tangle Kelp was unlocked, and still appears even if no Tangle Kelp was used in the current level.
 * Ambush zombies have three mini-games featuring them: Grave Danger (which is a canceled Mini-game), Whack a Zombie, and Bungee Blitz (which is also a canceled mini-game).
 * The Day levels are the only levels that do not have any surprise attacks.
 * One exception to this is the Heavy Weapon mini-game.
 * In ZomBotany 2, there are no surprise attacks.
 * In Level 3-1, 3-2, 4-1, 4-2, 5-1, and 5-2, there are only two ambush zombies instead of the normal three.

Plants vs. Zombies 2

 * Player's House, Wild West, Neon Mixtape Tour, Jurassic Marsh and Modern Day are currently the only areas that do not have any surprise attacks.
 * However, in the case of the player's house, sandstorms, snowstorms, raiding parties, bot swarms and parachute rains can occur during a Piñata Party.
 * During a raiding party, there might be as little as one Swashbuckler Zombie. In Dead Man's Booty, the higher the level, the greater and more frequent Swashbuckler Zombies will perform.
 * In Piñata Parties, sandstorms can consist of zombies other than the basic Mummy Zombie.
 * After the 2.3.1 update, there is a bug that after the Sandstorm ends, the image just fades away but stays on the screen. However, this glitch was fixed in later updates.
 * In the 2.9.1 update, the zombies coming from underground immediately appear without doing raising animation. This was fixed in the 3.0 update.
 * If a zombie coming via Sandstorm is killed in the process, the sandstorm aura will not fade away and will block the projectiles shot from the plants for temporary time. However, this bug was fixed in the 3.3.1 update.
 * Necromancy is the only ambush that can be prevented from happening (using Grave Busters to clear the graves).
 * However, Raiding Party and Bot Swarm can be avoided with Blover.
 * Necromancy and Low Tide are the only ambushes which makes a resemblance to Plants vs. Zombies, those being the night and pool ambushes.
 * Parachute Rain, Bot Swarm and Leprechauns are the only surprise attacks which involves zombies falling from mid air.
 * In St. Patrick's Piñata Party the falling Leprechauns could give gold coins when killed, however this was changed in Luck O' Zombie event.