diff --git a/user/edit.php b/user/edit.php
index <HASH>..<HASH> 100644
--- a/user/edit.php
+++ b/user/edit.php
@@ -100,6 +100,10 @@
 
     //create form
     $userform = new user_edit_form();
+    if (empty($user->country)) {
+        // MDL-16308 - we must unset the value here so $CFG->country can be used as default one
+        unset($user->country);
+    }
     $userform->set_data($user);
 
     $email_changed = false;
MDL-<I> Use default country instead of empty one when some external auth source (LDAP, POP3 etc) is used. Merged from <I>