diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
index 30c1d7c..9978bda 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
@@ -7,12 +7,14 @@
 
 namespace Drupal\Core\Config\Entity;
 
+use Drupal\Component\Utility\String;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityMalformedException;
 use Drupal\Core\Entity\EntityStorageControllerBase;
 use Drupal\Core\Config\Config;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Config\StorageInterface;
+use Drupal\Core\Entity\EntityStorageException;
 use Drupal\Core\Entity\Query\QueryFactory;
 use Drupal\Component\Uuid\UuidInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -367,6 +369,12 @@ public function save(EntityInterface $entity) {
     $config = $this->configFactory->get($prefix . $id);
     $is_new = $config->isNew();
 
+    // If the entity is new but a config file for it already exists, prevent
+    // it to be overwritten.
+    if ($entity->isNew() && !$config->isNew()) {
+      throw new EntityStorageException(String::format('@type entity with ID @id already exists.', array('@type' => $this->entityType, '@id' => $entity->id())));
+    }
+
     if (!$is_new && !isset($entity->original)) {
       $this->resetCache(array($id));
       $entity->original = $this->load($id);
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php
index 9acca96..955177e 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\config\Tests;
 
 use Drupal\Core\Entity\EntityMalformedException;
+use Drupal\Core\Entity\EntityStorageException;
 use Drupal\Core\Language\Language;
 use Drupal\simpletest\WebTestBase;
 
@@ -135,24 +136,18 @@ function testCRUD() {
     $this->assertIdentical($config_test->isNew(), FALSE);
     $this->assertIdentical($config_test->getOriginalId(), $expected['id']);
 
-    // Re-create the entity with the same ID and verify updated status.
+    // Make sure that is not possible to overwrite an existing entity with
+    // a new one.
     $same_id = entity_create('config_test', array(
       'id' => $config_test->id(),
     ));
     $this->assertIdentical($same_id->isNew(), TRUE);
-    $status = $same_id->save();
-    $this->assertIdentical($status, SAVED_UPDATED);
-
-    // Verify that the entity was overwritten.
-    $same_id = entity_load('config_test', $config_test->id());
-    $this->assertIdentical($same_id->id(), $config_test->id());
-    $this->assertIdentical($same_id->label(), NULL);
-    $this->assertNotEqual($same_id->uuid(), $config_test->uuid());
-
-    // Delete the overridden entity first.
-    $same_id->delete();
-    // Revert to previous state.
-    $config_test->save();
+    try {
+      $same_id->save();
+      $this->fail('Not possible to overwrite an entity entity.');
+    } catch (EntityStorageException $e) {
+      $this->pass('Not possible to overwrite an entity entity.');
+    }
 
     // Verify that renaming the ID returns correct status and properties.
     $ids = array($expected['id'], 'second_' . $this->randomName(4), 'third_' . $this->randomName(4));
