diff --git a/Knot.files b/Knot.files
index 5322afdfe6286b89f4904e515ac8181adb7b9c5f..8a82f4a3cb26d6879fb3237620051f16fe6f697d 100644
--- a/Knot.files
+++ b/Knot.files
@@ -55,6 +55,8 @@ src/contrib/lmdb/midl.c
 src/contrib/lmdb/midl.h
 src/contrib/lookup.h
 src/contrib/macros.h
+src/contrib/murmurhash3/murmurhash3.c
+src/contrib/murmurhash3/murmurhash3.h
 src/contrib/net.c
 src/contrib/net.h
 src/contrib/openbsd/strlcat.c
@@ -385,8 +387,6 @@ src/libknot/internal/namedb/namedb_trie.c
 src/libknot/internal/namedb/namedb_trie.h
 src/libknot/internal/trie/hat-trie.c
 src/libknot/internal/trie/hat-trie.h
-src/libknot/internal/trie/murmurhash3.c
-src/libknot/internal/trie/murmurhash3.h
 src/libknot/libknot.h
 src/libknot/packet/compr.c
 src/libknot/packet/compr.h
diff --git a/src/Makefile.am b/src/Makefile.am
index c3c94816c0fada1052f07ab91e1f2cb2cbaf2bef..9a7fc4692c1d8faf4300d382a9c0eded88157455 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,7 @@ nobase_libcontrib_la_HEADERS =			\
 	contrib/tolower.h			\
 	contrib/wire.h				\
 	contrib/wire_ctx.h			\
+	contrib/murmurhash3/murmurhash3.h	\
 	contrib/openbsd/strlcat.h		\
 	contrib/openbsd/strlcpy.h		\
 	contrib/ucw/array-sort.h		\
@@ -91,8 +92,7 @@ nobase_libknot_internal_la_HEADERS = 		\
 	libknot/internal/namedb/namedb.h	\
 	libknot/internal/namedb/namedb_lmdb.h	\
 	libknot/internal/namedb/namedb_trie.h	\
-	libknot/internal/trie/hat-trie.h	\
-	libknot/internal/trie/murmurhash3.h
+	libknot/internal/trie/hat-trie.h
 
 libknot_yparser_ladir = $(includedir)
 nobase_libknot_yparser_la_HEADERS = 		\
@@ -110,6 +110,7 @@ libcontrib_la_SOURCES = 			\
 	contrib/print.c				\
 	contrib/sockaddr.c			\
 	contrib/string.c			\
+	contrib/murmurhash3/murmurhash3.c	\
 	contrib/openbsd/strlcat.c		\
 	contrib/openbsd/strlcpy.c		\
 	contrib/ucw/heap.c			\
@@ -161,7 +162,6 @@ libknot_internal_la_SOURCES = 			\
 	libknot/internal/namedb/namedb_lmdb.c	\
 	libknot/internal/namedb/namedb_trie.c	\
 	libknot/internal/trie/hat-trie.c	\
-	libknot/internal/trie/murmurhash3.c	\
 	$(nobase_libknot_internal_la_HEADERS)
 
 libcontrib_la_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/src/libknot/internal/trie/murmurhash3.c b/src/contrib/murmurhash3/murmurhash3.c
similarity index 96%
rename from src/libknot/internal/trie/murmurhash3.c
rename to src/contrib/murmurhash3/murmurhash3.c
index 223ced56a0121ce7978d50b9baef46a70863c209..e97cc909984686194aa70c91ff5958e552ec997b 100644
--- a/src/libknot/internal/trie/murmurhash3.c
+++ b/src/contrib/murmurhash3/murmurhash3.c
@@ -1,7 +1,7 @@
 /* This is MurmurHash3. The original C++ code was placed in the public domain
  * by its author, Austin Appleby. */
 
-#include "libknot/internal/trie/murmurhash3.h"
+#include "contrib/murmurhash3/murmurhash3.h"
 
 static inline uint32_t fmix(uint32_t h)
 {
diff --git a/src/libknot/internal/trie/murmurhash3.h b/src/contrib/murmurhash3/murmurhash3.h
similarity index 100%
rename from src/libknot/internal/trie/murmurhash3.h
rename to src/contrib/murmurhash3/murmurhash3.h
diff --git a/src/knot/server/rrl.c b/src/knot/server/rrl.c
index 01514a90d60a15ee11fe612c2dbdde3e9ea1a4af..fc3710319a499d379d5ea75c183d2e57a14a2ee2 100644
--- a/src/knot/server/rrl.c
+++ b/src/knot/server/rrl.c
@@ -22,7 +22,7 @@
 #include "knot/server/rrl.h"
 #include "knot/zone/zone.h"
 #include "libknot/libknot.h"
-#include "libknot/internal/trie/murmurhash3.h"
+#include "contrib/murmurhash3/murmurhash3.h"
 #include "contrib/sockaddr.h"
 
 /* Hopscotch defines. */
diff --git a/src/libknot/internal/hhash.c b/src/libknot/internal/hhash.c
index 3906f1813be8cce7bd0c189a0787ba5b5e437cdd..e3c9c8d211fff80f0d386117650f53d7ce414b6f 100644
--- a/src/libknot/internal/hhash.c
+++ b/src/libknot/internal/hhash.c
@@ -3,8 +3,8 @@
 #include <stdbool.h>
 
 #include "contrib/macros.h"
+#include "contrib/murmurhash3/murmurhash3.h"
 #include "libknot/internal/hhash.h"
-#include "libknot/internal/trie/murmurhash3.h"
 #include "libknot/errcode.h"
 
 /* UCW array sorting defines. */