diff --git a/src/AliasCleaner.php b/src/AliasCleaner.php
index a649606..862e268 100644
--- a/src/AliasCleaner.php
+++ b/src/AliasCleaner.php
@@ -139,7 +139,9 @@ class AliasCleaner implements AliasCleanerInterface {
       $seppattern = preg_quote($separator, '/');

       // Replace multiple separators with a single one.
-      $output = preg_replace("/$seppattern+/", $separator, $output);
+      if (!$config->get('allow_multiple_separator')) {
+        $output = preg_replace("/$seppattern+/", $separator, $output);
+      }

       // Replace trailing separators around slashes.
       if ($separator !== '/') {
diff --git a/src/Form/PathautoSettingsForm.php b/src/Form/PathautoSettingsForm.php
index f45cbb4..2484cb9 100644
--- a/src/Form/PathautoSettingsForm.php
+++ b/src/Form/PathautoSettingsForm.php
@@ -171,6 +171,13 @@ class PathautoSettingsForm extends ConfigFormBase {
       '#description' => $this->t('Character used to separate words in titles. This will replace any spaces and punctuation characters. Using a space or + character can cause unexpected results.'),
     ];

+    $form['allow_multiple_separator'] = [
+      '#type' => 'checkbox',
+      '#title' => $this->t('Allow duplicate separator'),
+      '#default_value' => $config->get('allow_multiple_separator'),
+      '#description' => $this->t('Do not replace multiple separators with a single one. E.g. foo/bar--baz will not be replaced with foo/bar-baz if "-" is the chosen separator.'),
+    ];
+
     $form['case'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Character case'),
diff --git a/tests/src/Functional/PathautoSettingsFormWebTest.php b/tests/src/Functional/PathautoSettingsFormWebTest.php
index bbbb3c0..fe20956 100644
--- a/tests/src/Functional/PathautoSettingsFormWebTest.php
+++ b/tests/src/Functional/PathautoSettingsFormWebTest.php
@@ -48,6 +48,7 @@ class PathautoSettingsFormWebTest extends BrowserTestBase {
     'transliterate' => '1',
     'reduce_ascii' => FALSE,
     'ignore_words' => 'a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with',
+    'allow_multiple_separator' => FALSE,
   ];

   /**
@@ -123,6 +124,7 @@ class PathautoSettingsFormWebTest extends BrowserTestBase {
     $this->assertFieldChecked('edit-transliterate');
     $this->assertNoFieldChecked('edit-reduce-ascii');
     $this->assertField('edit-ignore-words', $this->defaultFormValues['ignore_words']);
+    $this->assertNoFieldChecked('edit-allow-multiple-separator');
   }

   /**
