diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php
index 335a9cd..e3c1827 100644
--- a/core/modules/block/lib/Drupal/block/BlockFormController.php
+++ b/core/modules/block/lib/Drupal/block/BlockFormController.php
@@ -175,6 +175,7 @@ public function form(array $form, array &$form_state) {
       '#empty_value' => BLOCK_REGION_NONE,
       '#options' => system_region_list($entity->get('theme'), REGIONS_VISIBLE),
     );
+
     return $form;
   }
 
@@ -196,6 +197,9 @@ public function validate(array $form, array &$form_state) {
     $entity = $this->entity;
     if ($entity->isNew()) {
       form_set_value($form['id'], $entity->get('theme') . '.' . $form_state['values']['machine_name'], $form_state);
+      if (entity_load('block', $form_state['values']['id'])) {
+        form_error($form['machine_name'], t('The machine-readable name is already in use. It must be unique.'));
+      }
     }
     if (!empty($form['machine_name']['#disabled'])) {
       $config_id = explode('.', $form_state['values']['machine_name']);
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php
index 75bcb39..8b9d741 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php
@@ -138,6 +138,33 @@ function testBlock() {
   }
 
   /**
+   * Test creating a block with a duplicate machine name.
+   */
+  function testDuplicateMachineName() {
+    // Configure the 'Powered by Drupal' block.
+    $block = array();
+    $block['id'] = 'system_powered_by_block';
+    $block['settings[label]'] = $this->randomName(8);
+    $block['machine_name'] = strtolower($this->randomName(8));
+    $block['theme'] = config('system.theme')->get('default');
+    $block['region'] = 'header';
+
+    // Set block title to confirm that interface works and override any custom titles.
+    $this->drupalPost('admin/structure/block/add/' . $block['id'] . '/' . $block['theme'], array('settings[label]' => $block['settings[label]'], 'machine_name' => $block['machine_name'], 'region' => $block['region']), t('Save block'));
+    $this->assertText(t('The block configuration has been saved.'), 'Block title set.');
+
+    // Reuse the machine name and change the plugin id to the 'Help' block.
+    $block['id'] = 'system_help_block';
+    $block['region'] = 'help';
+    $this->drupalPost('admin/structure/block/add/' . $block['id'] . '/' . $block['theme'], array('settings[label]' => $block['settings[label]'], 'machine_name' => $block['machine_name'], 'region' => $block['region']), t('Save block'));
+    $this->assertText(t('The machine-readable name is already in use. It must be unique.'));
+
+    // Check to see if the original block has been overwritten.
+    $instance = entity_load('block', $block['theme'] . '.' . $block['machine_name']);
+    $this->assertEqual($instance->get('plugin'), 'system_powered_by_block');
+  }
+
+  /**
    * Test block title display settings.
    */
   function testHideBlockTitle() {
