diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 7ea9ef9..59220db 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -1012,7 +1012,8 @@ class SQLUpdateCompiler(SQLCompiler):
                     raise FieldError("Aggregate functions are not allowed in this query")
             elif hasattr(val, 'prepare_database_save'):
                 if field.remote_field:
-                    val = val.prepare_database_save(field)
+                    val = field.get_db_prep_save(val.prepare_database_save(field),
+                                                 connection=self.connection)
                 else:
                     raise TypeError("Database is trying to update a relational field "
                                     "of type %s with a value of type %s. Make sure "
diff --git a/tests/update/models.py b/tests/update/models.py
index e0b391d..08706ef 100644
--- a/tests/update/models.py
+++ b/tests/update/models.py
@@ -2,6 +2,7 @@
 Tests for the update() queryset method that allows in-place, multi-object
 updates.
 """
+import uuid
 
 from django.db import models
 from django.utils import six
@@ -50,3 +51,11 @@ class Foo(models.Model):
 
 class Bar(models.Model):
     foo = models.ForeignKey(Foo, to_field='target')
+
+
+class UUIDPK(models.Model):
+    id = models.UUIDField(primary_key=True, default=uuid.uuid4)
+
+
+class UUIDRelation(models.Model):
+    relation = models.ForeignKey(UUIDPK)
diff --git a/tests/update/tests.py b/tests/update/tests.py
index 1ed316c..a0b5934 100644
--- a/tests/update/tests.py
+++ b/tests/update/tests.py
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
 
 from django.test import TestCase
 
-from .models import A, B, D, Bar, DataPoint, Foo, RelatedPoint
+from .models import A, B, D, Bar, DataPoint, Foo, RelatedPoint, UUIDPK, UUIDRelation
 
 
 class SimpleTest(TestCase):
@@ -138,3 +138,23 @@ class AdvancedTests(TestCase):
         self.assertEqual(bar_qs[0].foo_id, a_foo.target)
         bar_qs.update(foo=b_foo)
         self.assertEqual(bar_qs[0].foo_id, b_foo.target)
+
+
+class UUIDRelationTests(TestCase):
+
+    def setUp(self):
+        self.u1 = UUIDPK.objects.create()
+        u2 = UUIDPK.objects.create()
+        UUIDRelation.objects.create(relation=u2)
+
+    def test_update_uuid_fk_with_model_instance(self):
+        """
+        Update of a FK to a model with UUID pk using a model instance
+        """
+        UUIDRelation.objects.update(relation=self.u1)
+
+    def test_update_uuid_fk_with_uuid_instance(self):
+        """
+        Update of a FK to a model with UUID pk using a UUID instance
+        """
+        UUIDRelation.objects.update(relation=self.u1.pk)
