The commander of the US Pacific Fleet has announced his retirement after being passed up for a major promotion. It comes after two US Navy vessels collided with commercial ships in the Pacific over the summer, killing 17 sailors.

Admiral Scott Swift made the unexpected announcement on Facebook, after learning that he would not be given the opportunity to serve as chief of all military forces in the region.

“I have been informed by the Chief of Naval Operations that I will not be his nominee to replace Adm. Harris as the Commander, US Pacific Command. In keeping with tradition and in loyalty to the Navy, I have submitted my request to retire,” he wrote, adding that he has “not requested a retirement date as there is much work to be done here...”

Swift, 60, was promoted to admiral in May 2015, becoming the 35th commander since the Pacific Fleet was established in 1941. He had previously worked at the Pentagon as director of Navy staff.

His tenure saw a string of accidents involving Navy ships. In the latest incident, the USS McCain missile destroyer collided with a commercial oil tanker east of Singapore in August, leading to the deaths of 10 US soldiers after a hole was torn in the vessel’s left real hull, flooding adjacent compartments including crew berths, machinery, and communication rooms.

Seven US soldiers were killed just two months before the McCain incident, when the USS Fitzgerald collided with a container ship off the coast of Japan.

Although investigations into the McCain and Fitzgerald collisions are ongoing, the US Navy has already fired a number of people in connection with the incidents. Among the firings were the Fitzgerald’s captain and other sailors, after poor seamanship and flaws in keeping watch were found to have contributed to the deadly collision.

Rear Admiral Charles Williams, commander of Task Force 70, and Captain Jeffrey Bennett, commander of Destroyer Squadron 15, were fired by Seventh Fleet Commander Vice Admiral Phil Sawyer earlier this month. The Navy stated that “both reliefs were due to a loss of confidence in their ability to command.”

The previous Seventh Fleet Commander, Joseph Aucoin, was fired on August 23, with the Navy citing the same “loss of confidence.”

Whoever is chosen to replace Harris as commander of the US Pacific Command will have to be approved by the US Senate. The Pentagon could ask Harris to continue beyond the expected end of his three-year term in May.

Swift’s announcement comes as tensions between the US and North Korea continue to rise in the region and beyond, with Pyongyang and Washington increasingly involved in a war of words and saber-rattling.