diff --git a/background_scripts/main.js b/background_scripts/main.js
index ab8eb9e19..7d91cc16f 100644
--- a/background_scripts/main.js
+++ b/background_scripts/main.js
@@ -254,7 +254,16 @@ const BackgroundCommands = {
       // In Firefox, Ctrl-W will not close a pinned tab, but on Chrome, it will. We try to be
       // consistent with each browser's UX for pinned tabs.
       if (tab.pinned && BgUtils.isFirefox()) return;
-      chrome.tabs.remove(tab.id);
+      if(Settings.get("keepLastTabOpen")){
+        chrome.tabs.query({ currentWindow: true }, function (tabs) {
+          if(tabs.length == 1){
+            chrome.tabs.create({ url: Settings.get("newTabUrl") });
+          }
+          chrome.tabs.remove(tab.id);
+        });
+      } else {
+        chrome.tabs.remove(tab.id);
+      }
     });
   },
   restoreTab: mkRepeatCommand((request, callback) =>
diff --git a/lib/settings.js b/lib/settings.js
index 3663af266..140878b2f 100644
--- a/lib/settings.js
+++ b/lib/settings.js
@@ -69,6 +69,7 @@ w: https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s Wikipedi
   waitForEnterForFilteredHints: true,
   helpDialog_showAdvancedCommands: false,
   ignoreKeyboardLayout: false,
+  keepLastTabOpen: false,
 };
 
 /*
diff --git a/pages/options.html b/pages/options.html
index 9562e9eb4..f68ae0d65 100644
--- a/pages/options.html
+++ b/pages/options.html
@@ -232,6 +232,20 @@
             </label>
           </td>
         </tr>
+        <tr>
+          <td class="caption"></td>
+          <td verticalAlign="top" class="booleanOption">
+            <div class="help">
+              <div class="example">
+                Do not close the last tab
+              </div>
+            </div>
+            <label>
+              <input id="keepLastTabOpen" type="checkbox" />
+              Do not close the last tab 
+            </label>
+          </td>
+        </tr>
         <tr>
           <td class="caption">Default search<br />engine</td>
           <td verticalAlign="top">
diff --git a/pages/options.js b/pages/options.js
index 886beeb5a..f9cebd3b3 100644
--- a/pages/options.js
+++ b/pages/options.js
@@ -17,6 +17,7 @@ const options = {
   searchUrl: "string",
   settingsVersion: "string", // This is a hidden field.
   userDefinedLinkHintCss: "string",
+  keepLastTabOpen: "boolean",
 };
 
 const OptionsPage = {