According to this map, new building permissions in Portugal are dependant on structural hazard zones (e.g. you will not get a permission to build in red zones, except directly on the walls of – registered – ruins):
https://sig.icnf.pt/portal/home/webmap/viewer.html?useExisting=1&layers=fc947c8688dc48d29a415e6dffd5e384

Structural Hazard Map
Very low
Low
Medium
High
Very high

Portugal – South (including Algarve)
Portugal – area Castro Marim

Example: Building permission refused after 18 month because of fire hazard

Read the comments to this video, this is an interesting discussion about the new law in Portugal. Solution below: