diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m
index b6552d9a053e704eb0ee3519a8694e805a29a140..0452342fd13a32aaa48146f0433ab33351b67b53 100644
--- a/matlab/dynare_estimation_init.m
+++ b/matlab/dynare_estimation_init.m
@@ -301,7 +301,11 @@ else
     estim_params_.full_calibration_detected=0;
 end
 if options_.use_calibration_initialization %set calibration as starting values
-    [xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
+    if ~isempty(bayestopt_) && all(bayestopt_.pshape==0) && any(all(isnan([xparam1_calib xparam1]),2))
+        error('Estimation: When using the use_calibration option with ML, the parameters must be properly initialized.')
+    else
+        [xparam1,estim_params_]=do_parameter_initialization(estim_params_,xparam1_calib,xparam1); %get explicitly initialized parameters that have precedence to calibrated values
+    end
 end
 
 if ~isempty(estim_params_) && ~all(strcmp(fieldnames(estim_params_),'full_calibration_detected'))