diff --git a/subcmds/init.py b/subcmds/init.py
index b73de71..c5bf282 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -32,7 +32,7 @@
 from color import Coloring
 from command import InteractiveCommand, MirrorSafeCommand
 from error import ManifestParseError
-from project import SyncBuffer
+from project import SyncBuffer, MetaProject
 from git_config import GitConfig
 from git_command import git_require, MIN_GIT_VERSION
 
@@ -374,6 +374,52 @@
       print('   rm -r %s/.repo' % self.manifest.topdir)
       print('and try again.')
 
+  def _SyncProjectHooks(self, opt, repodir):
+    """Downloads the defined hooks supplied in the projecthooks element
+
+    """
+    # Always delete projecthooks and re-download for every new init.
+    projecthooksdir = os.path.join(repodir, 'projecthooks')
+    if os.path.exists(projecthooksdir):
+      shutil.rmtree(projecthooksdir)
+    for remotename in self.manifest.remotes:
+      r = self.manifest.remotes.get(remotename)
+      if r.projecthookName is not None and r.projecthookRevision is not None:
+        projecthookurl = r.resolvedFetchUrl.rstrip('/') + '/' + r.projecthookName
+
+        ph = MetaProject(manifest = self.manifest,
+        name = r.projecthookName,
+        gitdir   = os.path.join(projecthooksdir,'%s/%s.git' % (remotename, r.projecthookName)),
+        worktree = os.path.join(projecthooksdir,'%s/%s' % (remotename, r.projecthookName)))
+
+        ph.revisionExpr = r.projecthookRevision
+        is_new = not ph.Exists
+
+        if is_new:
+          if not opt.quiet:
+            print('Get projecthook %s' % \
+              GitConfig.ForUser().UrlInsteadOf(projecthookurl), file=sys.stderr)
+          ph._InitGitDir(MirrorOverride=True)
+
+        phr = ph.GetRemote(remotename)
+        phr.name = 'origin'
+        phr.url = projecthookurl
+        phr.ResetFetch()
+        phr.Save()
+
+        if not ph.Sync_NetworkHalf(quiet=opt.quiet, is_new=is_new, clone_bundle=False):
+          print('fatal: cannot obtain projecthook %s' % phr.url, file=sys.stderr)
+
+          # Better delete the git dir if we created it; otherwise next
+          # time (when user fixes problems) we won't go through the "is_new" logic.
+          if is_new:
+            shutil.rmtree(ph.gitdir)
+          sys.exit(1)
+
+        syncbuf = SyncBuffer(ph.config)
+        ph.Sync_LocalHalf(syncbuf)
+        syncbuf.Finish()
+
   def Execute(self, opt, args):
     git_require(MIN_GIT_VERSION, fail=True)
 
@@ -389,6 +435,7 @@
 
     self._SyncManifest(opt)
     self._LinkManifest(opt.manifest_name)
+    self._SyncProjectHooks(opt, self.manifest.repodir)
 
     if os.isatty(0) and os.isatty(1) and not self.manifest.IsMirror:
       if opt.config_name or self._ShouldConfigureUser():
