I'm not sure if this is a glitch, or just an issue caused by slow/unresponsive servers.
I'm in Team Valour, and each time I have lowered a teams prestige to zero resulting in them being evicted from the gym, they are already back in before I have even had a chance to place one of my Pokémon there.
I have done this 3 times at the same gym and it is becoming very frustrating.
Is this an intended mechanic reacting badly to slow servers, or is it a glitch?
Best Answer
When you defeat a gym, your team doesn't gain control of it. The gym becomes neutralized, so any team in the area can take it. You just have to try to act faster, and put a Pokemon in the gym right when you beat it.
So yes, it is an intended effect.
Edit, based on comment regarding update: