diff --git a/gio/gapplication.c b/gio/gapplication.c
index 016887f..a94605c 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -176,6 +176,7 @@ enum
 enum
 {
   SIGNAL_STARTUP,
+  SIGNAL_SHUTDOWN,
   SIGNAL_ACTIVATE,
   SIGNAL_OPEN,
   SIGNAL_ACTION,
@@ -209,6 +210,11 @@ g_application_real_startup (GApplication *application)
 }
 
 static void
+g_application_real_shutdown (GApplication *application)
+{
+}
+
+static void
 g_application_real_activate (GApplication *application)
 {
   if (!g_signal_has_handler_pending (application,
@@ -520,6 +526,7 @@ g_application_class_init (GApplicationClass *class)
   class->before_emit = g_application_real_before_emit;
   class->after_emit = g_application_real_after_emit;
   class->startup = g_application_real_startup;
+  class->shutdown = g_application_real_shutdown;
   class->activate = g_application_real_activate;
   class->open = g_application_real_open;
   class->command_line = g_application_real_command_line;
@@ -579,6 +586,18 @@ g_application_class_init (GApplicationClass *class)
     g_signal_new ("startup", G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (GApplicationClass, startup),
                   NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+                  
+  /**
+   * GApplication::shutdown:
+   * @application: the application
+   *
+   * The ::shutdown signal is emitted only on the registered primary instance
+   * immediately after the main loop terminates.
+   */
+  g_application_signals[SIGNAL_SHUTDOWN] =
+    g_signal_new ("shutdown", G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST,
+                  G_STRUCT_OFFSET (GApplicationClass, shutdown),
+                  NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
 
   /**
    * GApplication::activate:
@@ -1322,6 +1341,9 @@ g_application_run (GApplication  *application,
         ->run_mainloop (application);
       status = 0;
     }
+    
+  if (application->priv->is_registered)
+    g_signal_emit (application, g_application_signals[SIGNAL_SHUTDOWN], 0);
 
   if (application->priv->impl)
     g_application_impl_flush (application->priv->impl);
diff --git a/gio/gapplication.h b/gio/gapplication.h
index b178701..bf6911d 100644
--- a/gio/gapplication.h
+++ b/gio/gapplication.h
@@ -62,6 +62,8 @@ struct _GApplication
 /**
  * GApplicationClass:
  * @startup: invoked on the primary instance immediately after registration
+ * @shutdown: invoked only on the registered primary instance immediately
+ *      after the main loop terminates
  * @activate: invoked on the primary instance when an activation occurs
  * @open: invoked on the primary instance when there are files to open
  * @command_line: invoked on the primary instance when a command-line is
@@ -94,6 +96,8 @@ struct _GApplicationClass
   /*< public >*/
   /* signals */
   void                      (* startup)             (GApplication              *application);
+  
+  void                      (* shutdown)            (GApplication              *application);
 
   void                      (* activate)            (GApplication              *application);
 
@@ -120,7 +124,7 @@ struct _GApplicationClass
   void                      (* run_mainloop)        (GApplication              *application);
 
   /*< private >*/
-  gpointer padding[12];
+  gpointer padding[11];
 };
 
 GType                   g_application_get_type                          (void) G_GNUC_CONST;
