diff --git a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
index a9e0ff0e86..1d7fcdfa98 100644
--- a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
+++ b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
@@ -21,6 +21,7 @@
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
+use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
 use Symfony\Component\HttpKernel\Exception\HttpException;
 
 /**
@@ -175,7 +176,7 @@ public function post(EntityInterface $entity = NULL) {
     // POSTed entities must not have an ID set, because we always want to create
     // new entities here.
     if (!$entity->isNew()) {
-      throw new BadRequestHttpException('Only new entities can be created');
+      throw new ConflictHttpException('Only new entities can be created');
     }
 
     $this->checkEditFieldAccess($entity);
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index a55ae929e9..3362df4f16 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -756,6 +756,11 @@ public function testPost() {
     $this->grantPermissionsToTestedRole(['restful post entity:' . static::$entityTypeId]);
 
 
+    // DX: 409 when POSTing to an existing entity.
+    $response = $this->request('POST', $this->getUrl(), $request_options);
+    $this->assertResourceResponse(409, 'Some useful message', $response);
+
+
     // 201 for well-formed request.
     // Delete the first created entity in case there is a uniqueness constraint.
     $this->entityStorage->load(static::$firstCreatedEntityId)->delete();
