diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp
index 40a8ddae..7b9cfd05 100644
--- a/src/ipa/ipu3/algorithms/af.cpp
+++ b/src/ipa/ipu3/algorithms/af.cpp
@@ -197,6 +197,26 @@ int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo)
 	return 0;
 }
 
+/**
+ * \brief Lock AE and AWB
+ * \param[in] context The shared IPA context
+ */
+void Af::afLockAeAwb(IPAContext &context)
+{
+	if (!context.frameContext.af.stable && ignoreCounter_ == 0)
+		context.configuration.af.requireAeAwbLock = true;
+}
+
+/**
+ * \brief Unlock AE and AWB
+ * \param[in] context The shared IPA context
+ */
+void Af::afUnlockAeAwb(IPAContext &context)
+{
+	if (context.frameContext.af.stable)
+		context.configuration.af.requireAeAwbLock = false;
+}
+
 /**
  * \brief AF coarse scan
  *
@@ -451,8 +471,10 @@ void Af::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
 		currentVariance_ = afEstimateVariance(y_item, afRawBufferLen, true);
 
 	if (!context.frameContext.af.stable) {
+		afLockAeAwb(context);
 		afCoarseScan(context);
 		afFineScan(context);
+		afUnlockAeAwb(context);
 	} else {
 		if (afIsOutOfFocus(context))
 			afReset(context);
diff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h
index 13c7e0e8..c03a163f 100644
--- a/src/ipa/ipu3/algorithms/af.h
+++ b/src/ipa/ipu3/algorithms/af.h
@@ -55,6 +55,8 @@ private:
 	double afEstimateVariance(y_table_item_t *y_item, uint32_t len,
 				  bool isY1);
 	bool afIsOutOfFocus(IPAContext context);
+	void afLockAeAwb(IPAContext &context);
+	void afUnlockAeAwb(IPAContext &context);
 
 	/* VCM step configuration. It is the current setting of the VCM step. */
 	uint32_t focus_;
