diff --git a/include/libcamera/base/span.h b/include/libcamera/base/span.h
index 5c7a98d8e..c8da7cfd1 100644
--- a/include/libcamera/base/span.h
+++ b/include/libcamera/base/span.h
@@ -86,7 +86,7 @@ struct tuple_size<Span<T, dynamic_extent>>;
 } /* namespace utils */
 
 template<typename T, std::size_t Extent>
-class Span
+class [[deprecated("Use `std::span` instead")]] Span
 {
 public:
 	using element_type = T;
@@ -256,7 +256,7 @@ private:
 };
 
 template<typename T>
-class Span<T, dynamic_extent>
+class [[deprecated("Use `std::span` instead")]] Span<T, dynamic_extent>
 {
 public:
 	using element_type = T;
diff --git a/test/span.cpp b/test/span.cpp
index 4b9f3279a..56b29512f 100644
--- a/test/span.cpp
+++ b/test/span.cpp
@@ -9,6 +9,7 @@
  * Include first to ensure the header is self-contained, as there's no span.cpp
  * in libcamera.
  */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #include <libcamera/base/span.h>
 
 #include <array>
