diff --git a/core/modules/block/src/BlockForm.php b/core/modules/block/src/BlockForm.php
index 1b1f427..2c444da 100644
--- a/core/modules/block/src/BlockForm.php
+++ b/core/modules/block/src/BlockForm.php
@@ -180,6 +180,13 @@ public function form(array $form, FormStateInterface $form_state) {
       );
     }
 
+    // Hidden weight setting.
+    $weight = $entity->isNew() ? $this->getRequest()->query->get('weight', 0) : $entity->getWeight();
+    $form['weight'] = array(
+      '#type' => 'hidden',
+      '#default_value' => $weight,
+    );
+
     // Region settings.
     $entity_region = $entity->getRegion();
     $region = $entity->isNew() ? $this->getRequest()->query->get('region', $entity_region) : $entity_region;
@@ -294,6 +301,7 @@ protected function actions(array $form, FormStateInterface $form_state) {
   public function validateForm(array &$form, FormStateInterface $form_state) {
     parent::validateForm($form, $form_state);
 
+    $form_state->setValue('weight', (int) $form_state->getValue('weight'));
     // The Block Entity form puts all block plugin form elements in the
     // settings form element, so just pass that to the block for validation.
     $this->getPluginForm($this->entity->getPlugin())->validateConfigurationForm($form['settings'], SubformState::createForSubform($form['settings'], $form, $form_state));
diff --git a/core/modules/block/src/Controller/BlockLibraryController.php b/core/modules/block/src/Controller/BlockLibraryController.php
index 69d18f1..57862fc 100644
--- a/core/modules/block/src/Controller/BlockLibraryController.php
+++ b/core/modules/block/src/Controller/BlockLibraryController.php
@@ -119,6 +119,7 @@ public function listBlocks(Request $request, $theme) {
     $definitions = $this->blockManager->getSortedDefinitions($definitions);
 
     $region = $request->query->get('region');
+    $weight = $request->query->get('weight');
     $rows = [];
     foreach ($definitions as $plugin_id => $plugin_definition) {
       $row = [];
@@ -144,6 +145,9 @@ public function listBlocks(Request $request, $theme) {
       if ($region) {
         $links['add']['query']['region'] = $region;
       }
+      if (isset($weight)) {
+        $links['add']['query']['weight'] = $weight;
+      }
       $destination = $this->redirectDestination->get();
       if ($destination) {
         $links['add']['query']['destination'] = $destination;
diff --git a/core/modules/block/src/Tests/BlockTest.php b/core/modules/block/src/Tests/BlockTest.php
index 039aa64..41039dd 100644
--- a/core/modules/block/src/Tests/BlockTest.php
+++ b/core/modules/block/src/Tests/BlockTest.php
@@ -172,6 +172,51 @@ public function testAddBlockFromLibrary() {
   }
 
   /**
+   * Tests adding a block from the library page with a weight query string.
+   */
+  public function testAddBlockFromLibraryWithWeight() {
+    $default_theme = $this->config('system.theme')->get('default');
+    // Test one positive, zero, and one negative weight.
+    foreach (['7', '0', '-9'] as $weight) {
+      $options = [
+        'query' => [
+          'region' => 'sidebar_first',
+          'weight' => $weight,
+        ],
+      ];
+      $this->drupalGet(Url::fromRoute('block.admin_library', ['theme' => $default_theme], $options));
+
+      $block_name = 'system_powered_by_block';
+      $add_url = Url::fromRoute('block.admin_add', [
+        'plugin_id' => $block_name,
+        'theme' => $default_theme
+      ]);
+      $links = $this->xpath('//a[contains(@href, :href)]', [':href' => $add_url->toString()]);
+      $this->assertEqual(1, count($links), 'Found one matching link.');
+      $this->assertEqual(t('Place block'), (string) $links[0], 'Found the expected link text.');
+
+      list($path, $query_string) = explode('?', $links[0]['href'], 2);
+      parse_str($query_string, $query_parts);
+      $this->assertEqual($weight, $query_parts['weight'], 'Found the expected weight query string.');
+
+      // Create a random title for the block.
+      $title = $this->randomMachineName(8);
+      $block_id = strtolower($this->randomMachineName(8));
+      $edit = [
+        'id' => $block_id,
+        'settings[label]' => $title,
+      ];
+      // Create the block using the link parsed from the library page.
+      $this->drupalPostForm($this->getAbsoluteUrl($links[0]['href']), $edit, t('Save block'));
+
+      // Ensure that the block was created with the expected weight.
+      /** @var \Drupal\block\BlockInterface $block */
+      $block = Block::load($block_id);
+      $this->assertEqual($weight, $block->getWeight(), 'Found the block with expected weight.');
+    }
+  }
+
+  /**
    * Test configuring and moving a module-define block to specific regions.
    */
   function testBlock() {
