diff --git a/typo3/sysext/backend/Classes/Template/DocumentTemplate.php b/typo3/sysext/backend/Classes/Template/DocumentTemplate.php
index 18c6eafcd75d4f3c48d28c56f0d88b245fdbb8c7..8dd75d65185e90e1eb5c97bd408096677d11d460 100644
--- a/typo3/sysext/backend/Classes/Template/DocumentTemplate.php
+++ b/typo3/sysext/backend/Classes/Template/DocumentTemplate.php
@@ -1511,6 +1511,39 @@ function jumpToUrl(URL) {
     */
     protected function getBackendFavicon()
     {
-        return PathUtility::getAbsoluteWebPath($GLOBALS['TBE_STYLES']['favicon'] ?: ExtensionManagementUtility::extPath('backend') . 'Resources/Public/Icons/favicon.ico');
+        $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['backend'], ['allowed_classes' => false]);
+
+        if (!empty($extConf['backendFavicon'])) {
+            $path =  $this->getUriForFileName($extConf['backendFavicon']);
+        } else {
+            $path = ExtensionManagementUtility::extPath('backend') . 'Resources/Public/Icons/favicon.ico';
+        }
+        return PathUtility::getAbsoluteWebPath($path);
+    }
+
+    /**
+     * Returns the uri of a relative reference, resolves the "EXT:" prefix
+     * (way of referring to files inside extensions) and checks that the file is inside
+     * the PATH_site of the TYPO3 installation
+     *
+     * @param string $filename The input filename/filepath to evaluate
+     * @return string Returns the filename of $filename if valid, otherwise blank string.
+     */
+    protected function getUriForFileName($filename)
+    {
+        if (strpos($filename, '://')) {
+            return $filename;
+        }
+        $urlPrefix = '';
+        if (strpos($filename, 'EXT:') === 0) {
+            $absoluteFilename = GeneralUtility::getFileAbsFileName($filename);
+            $filename = '';
+            if ($absoluteFilename !== '') {
+                $filename = PathUtility::getAbsoluteWebPath($absoluteFilename);
+            }
+        } elseif (strpos($filename, '/') !== 0) {
+            $urlPrefix = GeneralUtility::getIndpEnv('TYPO3_SITE_PATH');
+        }
+        return $urlPrefix . $filename;
     }
 }
diff --git a/typo3/sysext/backend/Resources/Private/Language/locallang.xlf b/typo3/sysext/backend/Resources/Private/Language/locallang.xlf
index b91a1cc3b9f0c52f0e35b0a9c5bd97311db3911a..5387089f5e1b677e75ed065591a43110600a0af9 100644
--- a/typo3/sysext/backend/Resources/Private/Language/locallang.xlf
+++ b/typo3/sysext/backend/Resources/Private/Language/locallang.xlf
@@ -31,6 +31,9 @@ Have a nice day.</source>
 			<trans-unit id="config.backendLogo">
 				<source>Logo: If set, this logo will be used instead of the TYPO3 logo in the TYPO3 Backend in the left top corner (e.g. fileadmin/images/backend-logo.png or EXT:my_theme/Resources/Public/Images/backend-logo.png</source>
 			</trans-unit>
+			<trans-unit id="config.backendFavicon">
+				<source>Favicon: If set, this favicon will be used instead of the TYPO3 logo (e.g. EXT:my_theme/Resources/Public/Images/favicon.ico)</source>
+			</trans-unit>
 			<trans-unit id="foldertreeview.noFolders.title">
 				<source>No folders available</source>
 			</trans-unit>
diff --git a/typo3/sysext/backend/ext_conf_template.txt b/typo3/sysext/backend/ext_conf_template.txt
index 5ff148350eba59c6d24268857e12c6d662241c3c..9099147b635a299e4dd96c31135283a8eccd570c 100644
--- a/typo3/sysext/backend/ext_conf_template.txt
+++ b/typo3/sysext/backend/ext_conf_template.txt
@@ -13,3 +13,6 @@ loginBackgroundImage =
 
 # cat=Backend; type=string; label=LLL:EXT:backend/Resources/Private/Language/locallang.xlf:config.backendLogo
 backendLogo =
+
+# cat=Backend; type=string; label=LLL:EXT:backend/Resources/Private/Language/locallang.xlf:config.backendFavicon
+backendFavicon =
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-77481-RemoveFaviconFromTBE_STYLES.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-77481-RemoveFaviconFromTBE_STYLES.rst
new file mode 100644
index 0000000000000000000000000000000000000000..8945ec8aa06ca9f2d1183b05154f057b0c1675b0
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-77481-RemoveFaviconFromTBE_STYLES.rst
@@ -0,0 +1,26 @@
+=================================================
+Breaking: #77481 - Remove favicon from TBE_STYLES
+=================================================
+
+Description
+===========
+
+The configuration :php:``$GLOBALS['TBE_STYLES']['favicon']`` has been removed.
+
+
+Impact
+======
+
+The configuration :php:``$GLOBALS['TBE_STYLES']['favicon']`` is not evaluated anymore.
+
+
+Affected Installations
+======================
+
+Any installation using :php:``$GLOBALS['TBE_STYLES']['favicon']``.
+
+
+Migration
+=========
+
+Define the favicon in the setting of the extension "backend" in the extension manager.
\ No newline at end of file
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-77481-AddPossibilityToDefineAFaviconForTheBackend.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-77481-AddPossibilityToDefineAFaviconForTheBackend.rst
new file mode 100644
index 0000000000000000000000000000000000000000..14a934264c693a230068bf87fb7b2e9c77ef3bf2
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-77481-AddPossibilityToDefineAFaviconForTheBackend.rst
@@ -0,0 +1,10 @@
+=====================================================================
+Feature: #77481 - Add possibility to define a favicon for the backend
+=====================================================================
+
+Description
+===========
+
+The new option ``backendFavicon`` in the extension manager configuration makes it possible to
+change the favicon of the backend. This makes it easier to distinguish between different
+installations and stages.
\ No newline at end of file