diff --git a/core/includes/form.inc b/core/includes/form.inc
index 87f8edf..deda05c 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -1281,6 +1281,16 @@ function form_process_button($element, $form_state) {
   if (isset($element['#limit_validation_errors']) && $element['#limit_validation_errors'] !== FALSE) {
     $element['#attributes']['formnovalidate'] = 'formnovalidate';
   }
+  // Ensure to attach JS library to prevent duplicate form submissions, unless
+  // the form is submitted via GET or this form button explicitly opted-out.
+  if ($form_state['method'] != 'get') {
+    if (empty($element['#allow_multi_submit'])) {
+      $element['#attached']['library'][] = array('system', 'drupal.form');
+    }
+    else {
+      $element['#attributes']['data-multi-submit'] = 1;
+    }
+  }
   return $element;
 }
 
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 9500adf..0e79c66 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -288,6 +288,7 @@ function system_element_info() {
     '#name' => 'op',
     '#is_button' => TRUE,
     '#executes_submit_callback' => TRUE,
+    '#allow_multi_submit' => FALSE,
     '#limit_validation_errors' => FALSE,
     '#process' => array('form_process_button', 'ajax_process_form'),
     '#pre_render' => array('form_pre_render_button'),
@@ -298,6 +299,7 @@ function system_element_info() {
     '#name' => 'op',
     '#is_button' => TRUE,
     '#executes_submit_callback' => FALSE,
+    '#allow_multi_submit' => TRUE,
     '#limit_validation_errors' => FALSE,
     '#process' => array('form_process_button', 'ajax_process_form'),
     '#pre_render' => array('form_pre_render_button'),
@@ -307,6 +309,7 @@ function system_element_info() {
     '#input' => TRUE,
     '#is_button' => TRUE,
     '#executes_submit_callback' => TRUE,
+    '#allow_multi_submit' => FALSE,
     '#limit_validation_errors' => FALSE,
     '#process' => array('form_process_button', 'ajax_process_form'),
     '#return_value' => TRUE,
