The best defense really is **removing the attractions** before you even think about a fence, because an alligator doesn't just invade a yard out of nowhere - it's looking for water or food. If you've got water pooling up, poor drainage, an unprotected pool, or exposed organic waste, the thing will find a way in even if the fence is bulletproof. Do a sweep of the property: fix leaks, clean out clogged gutters, get rid of standing water. That already solves a good chunk of the problem.
Now, about the fence itself, the guys above are right about the depth but they're not telling the whole story. Alligators can climb vertical things, sure, but the real risk is digging underneath - so 60-80cm buried is really necessary. But here's the thing: you don't need some fancy 1.5-meter-tall fence. What works is a continuous barrier made of sturdy material (galvanized steel, treated wood, even geomembrane in some cases) that combines height above ground with depth below, and that's **hard to damage**. Alligators have strong snouts and can rip apart flimsy stuff, so avoid really thin fences.
Also, check with your local city hall or civil defense in Mato Grosso - they might have specific guidelines for your region or even capture programs if the beast gets too aggressive. And don't let the kids play near the riverbank without supervision, and if you spot a big alligator hanging around, call a specialist before you try to handle it yourself 🦷