diff --git a/modules/file/file.module b/modules/file/file.module
index 3d351fa..ada7cab 100644
--- a/modules/file/file.module
+++ b/modules/file/file.module
@@ -352,6 +352,17 @@ function file_file_delete($file) {
 }
 
 /**
+ * Implements hook_user_delete()
+ */
+function file_user_delete($account) {
+  // Delete user picture.
+  if (!empty($account->picture)) {
+    file_usage_delete($account->picture, 'user', 'user', $account->uid);
+    file_delete($account->picture);
+  }
+}
+
+/**
  * Process function to expand the managed_file element type.
  *
  * Expands the file type to include Upload and Remove buttons, as well as
diff --git a/modules/user/user.test b/modules/user/user.test
index 92af9fa..6513fea 100644
--- a/modules/user/user.test
+++ b/modules/user/user.test
@@ -1133,6 +1133,44 @@ class UserPictureTestCase extends DrupalWebTestCase {
   }
 
   /**
+   * Tests that picture is deleted when user account is deleted.
+   */
+  function testUserCancelDeletePicture() {
+    if ($this->_directory_test) {
+      $this->drupalLogin($this->user);
+
+      $image = current($this->drupalGetTestFiles('image'));
+      $info = image_get_info($image->uri);
+
+      // Set new variables: valid dimensions, valid filesize (0 = no limit).
+      $test_dim = ($info['width'] + 10) . 'x' . ($info['height'] + 10);
+      variable_set('user_picture_dimensions', $test_dim);
+      variable_set('user_picture_file_size', 0);
+
+      $pic_path = $this->saveUserPicture($image);
+
+      // Load user object.
+      $account = user_load($this->user->uid, TRUE);
+
+      // Create administrative user to delete account.
+      $admin_user = $this->drupalCreateUser(array('administer users'));
+      $this->drupalLogin($admin_user);
+
+      // Delete regular user.
+      variable_set('user_cancel_method', 'user_cancel_reassign');
+      $this->drupalPost('user/' . $this->user->uid . '/edit', NULL, t('Cancel account'));
+
+      // Confirm deletion.
+      $this->drupalPost(NULL, NULL, t('Cancel account'));
+
+      $this->assertFalse(file_load($account->picture->fid), 'File is removed from database after account is cancelled');
+      // Clear out PHP's file stat cache so we see the current value.
+      clearstatcache();
+      $this->assertFalse(is_file($pic_path), 'File is removed from file system');
+    }
+  }
+
+  /**
    * Tests deletion of user pictures.
    */
   function testDeletePicture() {
