diff --git a/doc/RTD/source/ParameterFiles/parameter_description.rst b/doc/RTD/source/ParameterFiles/parameter_description.rst
index a4159377631fb45cc8d8f91d58d06f720a5cb785..0055ed22c28c88bffc7d8f22df2f884e26d62104 100644
--- a/doc/RTD/source/ParameterFiles/parameter_description.rst
+++ b/doc/RTD/source/ParameterFiles/parameter_description.rst
@@ -656,6 +656,17 @@ which stops these from being done at the scale of the leaf cells, of which
 there can be a large number. In this case cells with gravity tasks must be at
 least 4 levels above the leaf cells (when possible).
 
+To control the depth at which the ghost tasks are placed, there are
+two parameters (one for the gas, one for the stars). These specify the
+maximum number of particles allowed in such a task before splitting
+into finer ones. These parameters are:
+
+.. code:: YAML
+
+  engine_max_parts_per_ghost:   1000
+  engine_max_sparts_per_ghost:  1000
+
+
 Extra space is required when particles are created in the system (to the time
 of the next rebuild). These are controlled by:
 
diff --git a/doc/RTD/source/Task/index.rst b/doc/RTD/source/Task/index.rst
index 549a89c834570c45e7b4233f3c412fe8afba226d..41fa06b04c2febaf9f3602bbaaea12eba7863b3c 100644
--- a/doc/RTD/source/Task/index.rst
+++ b/doc/RTD/source/Task/index.rst
@@ -10,7 +10,7 @@ This section of the documentation includes information on the task system
 available in SWIFT, as well as how to implement your own task.
 
 SWIFT can produce a graph containing all the dependencies.
-Everything is described in :ref:`_analysistools`.
+Everything is described in :ref:`_Analysis_Tools`.
 
 
 .. toctree::
diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml
index 2d9bd1ded443575c97a9d36f39af8880910a3e31..e904a0dd4499da96495be76dfded2989d46ac18c 100644
--- a/examples/parameter_example.yml
+++ b/examples/parameter_example.yml
@@ -74,6 +74,8 @@ Scheduler:
   tasks_per_cell:            0.0       # (Optional) The average number of tasks per cell. If not large enough the simulation will fail (means guess...).
   links_per_tasks:           10        # (Optional) The average number of links per tasks (before adding the communication tasks). If not large enough the simulation will fail (means guess...). Defaults to 10.
   mpi_message_limit:         4096      # (Optional) Maximum MPI task message size to send non-buffered, KB.
+  engine_max_parts_per_ghost:   1000   # (Optional) Maximum number of parts per ghost.
+  engine_max_sparts_per_ghost:  1000   # (Optional) Maximum number of sparts per ghost.
 
 # Parameters governing the time integration (Set dt_min and dt_max to the same value for a fixed time-step run.)
 TimeIntegration:
diff --git a/src/engine.h b/src/engine.h
index fe40a4212c5e6b48844d18a6a1d54c25fc73602e..3afa8c221d2d1690dec45d2017a18fc0d3aee8ca 100644
--- a/src/engine.h
+++ b/src/engine.h
@@ -107,8 +107,8 @@ enum engine_step_properties {
 #define engine_foreign_alloc_margin 1.05
 #define engine_default_energy_file_name "energy"
 #define engine_default_timesteps_file_name "timesteps"
-#define engine_max_parts_per_ghost 1000
-#define engine_max_sparts_per_ghost 1000
+#define engine_max_parts_per_ghost_default 1000
+#define engine_max_sparts_per_ghost_default 1000
 #define engine_tasks_per_cell_margin 1.2
 
 /**
diff --git a/src/engine_maketasks.c b/src/engine_maketasks.c
index 85a9e07ef06c80490d420f4b8ccbe0cd28261554..94792933ed4f75f310c8fb74d7d7b60d02b7f55c 100644
--- a/src/engine_maketasks.c
+++ b/src/engine_maketasks.c
@@ -52,6 +52,9 @@
 #include "proxy.h"
 #include "timers.h"
 
+extern int engine_max_parts_per_ghost;
+extern int engine_max_sparts_per_ghost;
+
 /**
  * @brief Add send tasks for the gravity pairs to a hierarchy of cells.
  *
diff --git a/src/space.c b/src/space.c
index 9b5d509051f21a92e6232ce678b3db5d8878f802..1b5ba0e51cf399621d5edfb31b8ce06fb894fb88 100644
--- a/src/space.c
+++ b/src/space.c
@@ -86,6 +86,10 @@ int space_extra_bparts = space_extra_bparts_default;
 /*! Number of extra #gpart we allocate memory for per top-level cell */
 int space_extra_gparts = space_extra_gparts_default;
 
+/*! Maximum number of particles per ghost */
+int engine_max_parts_per_ghost = engine_max_parts_per_ghost_default;
+int engine_max_sparts_per_ghost = engine_max_sparts_per_ghost_default;
+
 /*! Expected maximal number of strays received at a rebuild */
 int space_expected_max_nr_strays = space_expected_max_nr_strays_default;
 #if defined(SWIFT_DEBUG_CHECKS) || defined(SWIFT_CELL_GRAPH)
@@ -4635,6 +4639,13 @@ void space_init(struct space *s, struct swift_params *params,
   space_extra_bparts = parser_get_opt_param_int(
       params, "Scheduler:cell_extra_bparts", space_extra_bparts_default);
 
+  engine_max_parts_per_ghost =
+      parser_get_opt_param_int(params, "Scheduler:engine_max_parts_per_ghost",
+                               engine_max_parts_per_ghost_default);
+  engine_max_sparts_per_ghost =
+      parser_get_opt_param_int(params, "Scheduler:engine_max_sparts_per_ghost",
+                               engine_max_sparts_per_ghost_default);
+
   if (verbose) {
     message("max_size set to %d split_size set to %d", space_maxsize,
             space_splitsize);