diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py
index 433b3ef78ed2ba8a33e9747218169cd3d4671684..618d0a26ecc170b0af990b2a1e3921a64f3359a5 100644
--- a/Custom_Hooks/eb_hooks.py
+++ b/Custom_Hooks/eb_hooks.py
@@ -88,6 +88,11 @@ TWEAKABLE_DEPENDENCIES = {
     'UCX': 'default',
 }
 
+MKL_THREADING_LAYER = {
+    'GCC': 'GNU',
+    'intel-compilers': 'INTEL',
+}
+
 SIDECOMPILERS = ['AOCC', 'Clang']
 
 common_site_contact = 'Support <sc@fz-juelich.de>'
@@ -614,3 +619,14 @@ def pre_ready_hook(self, *args, **kwargs):
                 path_to_ec,
             )
             exit(1)
+
+
+def pre_module_hook(self, *args, **kwargs):
+    # Compilers need to set MKL_THREADING_LAYER
+    if self.name in MKL_THREADING_LAYER:
+        # Must be done this way, updating self.cfg['modextravars']
+        # directly doesn't work due to templating.
+        with self.cfg.disable_templating():
+            self.cfg['modextravars'].update({
+                'MKL_THREADING_LAYER': MKL_THREADING_LAYER[self.name]
+            })