--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -461,7 +461,8 @@ void ToolbarView::Init() {
     send_tab_to_self_button_ =
         container_view_->AddChildView(std::move(send_tab_to_self_button));
 
-  if (!features::IsSidePanelPinningEnabled()) {
+  if (!features::IsSidePanelPinningEnabled() &&
+      !base::CommandLine::ForCurrentProcess()->HasSwitch("hide-sidepanel-button")) {
     if (companion::IsCompanionFeatureEnabled()) {
       side_panel_container_ = container_view_->AddChildView(
           std::make_unique<SidePanelToolbarContainer>(browser_view_));
--- a/chrome/browser/ungoogled_flag_entries.h
+++ b/chrome/browser/ungoogled_flag_entries.h
@@ -100,4 +100,8 @@
      "Disable Sharing Hub",
      "Disables the sharing hub button. ungoogled-chromium flag.",
      kOsDesktop, SINGLE_VALUE_TYPE("disable-sharing-hub")},
+    {"hide-sidepanel-button",
+     "Hide SidePanel Button",
+     "Hides the SidePanel Button. ungoogled-chromium flag.",
+     kOsDesktop, SINGLE_VALUE_TYPE("hide-sidepanel-button")},
 #endif  // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
