BATH, Maine — The last of the Navy’s original run of Arleigh Burke destroyers headed out to sea on Wednesday with sailors lining the deck in their white uniforms.

The Michael Murphy is named for a Medal of Honor recipient from New York’s Long Island who led a four-member SEAL team against overwhelming odds in a gun battle in Afghanistan. Murphy was shot on June 28, 2005, when he exposed himself to gunfire to get a clear signal to call for help. Only one of the SEALs survived.

The 510-foot warship left Bath Iron Works following a ceremony at Maine Maritime Museum, traveling down the Kennebec River toward the open ocean. It will be commissioned on Oct. 6 in New York City before traveling to the Pacific Ocean, where its home will be Pearl Harbor.

During Wednesday’s ceremony, Amy Lent from the maritime museum paid tribute to more than 400 years of shipbuilding history in Maine.

Dignitaries included Medal of Honor recipient Thomas Jerome Hudner Jr., a Massachusetts native and naval aviator for whom another destroyer is named, along with Rep. Mike Michaud and Navy and shipyard officials.

“Many of you have worked tirelessly, day in and day out, to ensure that only the highest-quality vessels are launched from these banks,” Michaud said. “You have constructed a truly remarkable ship, and I know it will serve America with distinction, much like her namesake.”

The Murphy is the 34th Burke-class destroyer built in Bath and was supposed to be the last before construction of three stealthy Zumwalt-class destroyers. The Navy has since decided to build more Burkes at Bath and at the Ingalls shipyard in Mississippi.