diff --git a/panels_mini/panels_mini.module b/panels_mini/panels_mini.module
index 115a17b..9021923 100644
--- a/panels_mini/panels_mini.module
+++ b/panels_mini/panels_mini.module
@@ -62,7 +62,7 @@ function panels_mini_settings() {
 // Allow the rest of the system access to mini panels
 
 /**
- * Implementation of hook_block_list().
+ * Implementation of hook_block_info().
  */
 function panels_mini_block_info() {
   // Safety: go away if CTools is not at an appropriate version.
@@ -74,7 +74,7 @@ function panels_mini_block_info() {
 
   $minis = panels_mini_load_all();
   foreach ($minis as $panel_mini) {
-    if (empty($panel_mini->disabled) && empty($panel_mini->requiredcontext)) {
+    if (empty($panel_mini->disabled) && (module_exists('page_manager') | empty($panel_mini->requiredcontexts))) {
       $blocks[$panel_mini->name] = array(
         'info' => t('Mini panel: "@title"', array('@title' => $panel_mini->admin_title)),
         'cache' => DRUPAL_NO_CACHE,
@@ -87,6 +87,8 @@ function panels_mini_block_info() {
 
 /**
  * Implementation of hook_block_view().
+ *
+ * @see panels_mini_panels_mini_content_type_render().
  */
 function panels_mini_block_view($delta = 0) {
   // static recursion protection.
@@ -103,7 +105,15 @@ function panels_mini_block_view($delta = 0) {
   }
 
   ctools_include('context');
-  $panel_mini->context = $panel_mini->display->context = ctools_context_load_contexts($panel_mini);
+
+  $contexts = array();
+  if (module_exists('page_manager') && $current_page = page_manager_get_current_page()) {
+    if (!empty($current_page['contexts'])) {
+      $contexts = ctools_context_match_required_contexts($panel_mini->requiredcontexts, $current_page['contexts']);
+    }
+  }
+
+  $panel_mini->context = $panel_mini->display->context =  ctools_context_load_contexts($panel_mini, FALSE, $contexts);
   $panel_mini->display->css_id = panels_mini_get_id($panel_mini->name);
 
   $block = array();
@@ -127,6 +137,48 @@ function panels_mini_block_configure($delta = 0) {
 }
 
 /**
+ * Implements hook_block_list_alter().
+ *
+ * Remove the block if the required contexts are not available.
+ */
+function panels_mini_block_list_alter(&$blocks) {
+  if (module_exists('page_manager')) {
+    $current_page = page_manager_get_current_page();
+  }
+  foreach ($blocks as $key => $block) {
+    if ($block->module != 'panels_mini') {
+      // This block was added by a contrib module, leave it in the list.
+      continue;
+    }
+
+    $panel_mini = panels_mini_load($block->delta);
+    if (empty($panel_mini)) {
+      // Bail out early if the specified mini panel doesn't exist.
+      unset($blocks[$key]);
+      continue;
+    }
+
+    if (!empty($panel_mini->requiredcontexts)) {
+      if (!$current_page || empty($current_page['contexts'])) {
+        unset($blocks[$key]);
+        continue;
+      }
+      else {
+        $required = array();
+        foreach ($panel_mini->requiredcontexts as $context) {
+          $info = ctools_get_context($context['name']);
+          $required[] = new ctools_context_required($context['identifier'], $info['context name']);
+        }
+        if (!ctools_context_match_requirements($current_page['contexts'], $required)) {
+          unset($blocks[$key]);
+          continue;
+        }
+      }
+    }
+  }
+}
+
+/**
  * Statically store all used IDs to ensure all mini panels get a unique id.
  */
 function panels_mini_get_id($name) {
