U.S. President Donald Trump on Thursday canceled plans to livestream the execution, by firing squad,?of a man convicted over a mass shooting at a military base, reversing a widely condemned move by Defense Secretary Pete Hegseth.

The plan to make Nidal Hasan’s execution public was opposed at home and abroad, with U.S. Democratic and Republican politicians, the Catholic Church and the United Nations all expressing outrage.

The cancellation is a blow to Hegseth, who is already under fire over the stalemated Iran war and its fallout, which are weighing on Trump’s Republican Party ahead of November midterm elections.