diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index b4f97477a..10206945d 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -7,16 +7,21 @@
 
 #pragma once
 
+#include <functional>
 #include <memory>
 #include <string>
 #include <sys/types.h>
 #include <vector>
 
+#include <libcamera/base/internal/cxx20.h>
 #include <libcamera/base/object.h>
 
+#include <libcamera/camera.h>
 #include <libcamera/controls.h>
 #include <libcamera/stream.h>
 
+#include "libcamera/internal/request.h"
+
 namespace libcamera {
 
 class Camera;
@@ -58,6 +63,53 @@ public:
 	void registerRequest(Request *request);
 	void queueRequest(Request *request);
 
+	void metadataAvailable(Request *request, const ControlList &metadata);
+
+	template<typename T>
+	void metadataAvailable(Request *request, const Control<T> &ctrl,
+			       const internal::cxx20::type_identity_t<T> &value)
+	{
+		Request::Private *d = request->_d();
+
+		auto &m = d->metadata2();
+		const auto c = m.checkpoint();
+
+		std::ignore = m.set(ctrl, value);
+		d->metadata().set(ctrl, value);
+
+		const auto diff = c.diffSince();
+		if (diff)
+			d->camera()->metadataAvailable.emit(request, diff);
+	}
+
+#ifndef __DOXYGEN__
+	struct MetadataSetter {
+		Request::Private *d;
+
+		template<typename T>
+		void operator()(const Control<T> &ctrl,
+			        const internal::cxx20::type_identity_t<T> &value) const
+		{
+			d->metadata().set(ctrl, value);
+			std::ignore = d->metadata2().set(ctrl, value);
+		}
+	};
+
+	template<typename Func, std::enable_if_t<std::is_invocable_v<Func&, MetadataSetter>> * = nullptr>
+#else
+	template<typename Func>
+#endif
+	void metadataAvailable(Request *request, Func func)
+	{
+		Request::Private *d = request->_d();
+		const auto c = d->metadata2().checkpoint();
+
+		std::invoke(func, MetadataSetter{ d });
+
+		if (const auto diff = c.diffSince())
+			d->camera()->metadataAvailable.emit(request, diff);
+	}
+
 	bool completeBuffer(Request *request, FrameBuffer *buffer);
 	void completeRequest(Request *request);
 	void cancelRequest(Request *request);
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 5c469e5ba..26675104b 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -543,6 +543,98 @@ void PipelineHandler::doQueueRequests(Camera *camera)
  * \return 0 on success or a negative error code otherwise
  */
 
+/**
+ * \brief Signal the availability of metadata for \a request
+ * \param[in] request The request the metadata belongs to
+ * \param[in] metadata The collection of metadata items
+ *
+ * This function copies metadata items from \a metadata to the cumulative metadata
+ * collection of \a request. This function may be called multiple times, but each
+ * metadata must only be set at most once. Afterwards the function notifies the
+ * application by triggering the Camera::availableMetadata signal with the just
+ * added metadata items.
+ *
+ * Early metadata completion allows pipeline handlers to fast track delivery of
+ * metadata results as soon as they are available before the completion of \a
+ * request. The full list of metadata results of a Request is available at
+ * Request completion time in Request::metadata().
+ *
+ * \context This function shall be called from the CameraManager thread.
+ *
+ * \sa PipelineHandler::metadataAvailable(Request *request, Func func)
+ * \sa PipelineHandler::metadataAvailable(Request *request,
+ *                                        const Control<T> &ctrl,
+ *                                        const internal::cxx20::type_identity_t<T> &value)
+ */
+void PipelineHandler::metadataAvailable(Request *request, const ControlList &metadata)
+{
+	Request::Private *d = request->_d();
+
+	d->metadata().merge(metadata);
+
+	const auto diff = d->metadata2().merge(metadata);
+	if (!diff)
+		LOG(Pipeline, Fatal) << "Tried to add incompatible metadata items";
+
+	if (!diff->empty())
+		d->camera()->metadataAvailable.emit(request, *diff);
+}
+
+/**
+ * \fn void PipelineHandler::metadataAvailable(Request *request, const Control<T> &ctrl,
+ *					       const internal::cxx20::type_identity_t<T> &value)
+ * \copybrief PipelineHandler::metadataAvailable(Request *request, const ControlList &metadata)
+ * \param[in] request The request the metadata belongs to
+ * \param[in] ctrl The control id of the metadata item
+ * \param[in] value The value of the metadata item
+ *
+ * This function serves the same purpose as
+ * PipelineHandler::metadataAvailable(Request *request, const ControlList &metadata)
+ * but it allows a single metadata item to be reported directly,
+ * without creating a ControlList.
+ *
+ * \context This function shall be called from the CameraManager thread.
+ * \sa PipelineHandler::metadataAvailable(Request *request, const ControlList &metadata)
+ */
+
+/**
+ * \fn void PipelineHandler::metadataAvailable(Request *request, Func func)
+ * \copybrief PipelineHandler::metadataAvailable(Request *request, const ControlList &metadata)
+ * \param[in] request The request the metadata belongs to
+ * \param[in] func The callback to invoke
+ *
+ * This function serves the same purpose as
+ * PipelineHandler::metadataAvailable(Request *request, const ControlList &metadata)
+ * but it provides more flexibility for pipeline handlers. This function invokes
+ * \a func, which receives as its sole argument an object of unspecified type whose
+ * operator() can be used to add metadata items.
+ *
+ * For example, a PipelineHandler might use this function to conditionally report two
+ * metadata items without creating an intermediate ControlList:
+ *
+ * \code
+	metadataAvailable(request, [&](auto set) {
+		if (...) // controls::X is available and ready to be reported
+			set(controls::X, ...);
+		if (...) // controls::Y is available and ready to be reported
+			set(controls::Y, ...);
+		// ...
+	});
+ * \endcode
+ *
+ * The advantage of the above over two calls to
+ * PipelineHandler::metadataAvailable(Request *request, const Control<T> &ctrl, const internal::cxx20::type_identity_t<T> &value)
+ * is that the application is only notified once, after \a func has returned.
+ *
+ * \note Calling any overload of metadataAvailable() inside \a func is not allowed.
+ * \note The object passed to \a func is only usable while \a func runs, it must not
+ *       be saved or reused.
+ *
+ * \context This function shall be called from the CameraManager thread.
+ *
+ * \sa PipelineHandler::metadataAvailable(Request *request, const ControlList &metadata)
+ */
+
 /**
  * \brief Complete a buffer for a request
  * \param[in] request The request the buffer belongs to
