Mr. Sestak, 67, a native of Pennsylvania, was elected to Congress in 2006, defeating a 10-term incumbent. He served in the military from 1974 to 2005, finishing as a three-star Navy admiral.

He commanded an aircraft carrier battle group that conducted combat operations in Afghanistan and Iraq; served as President Clinton’s director for defense policy on the National Security Council in the White House; and served as the deputy chief of naval operations for warfare requirements.

Mr. Sestak, who had a reputation as a hard-charging and demanding taskmaster, positioned himself in his announcement as a supporter of working-class Americans. He said that during his time in Congress, his office had fought to overturn denials of treatment by health insurance companies and to save more than 800 homes from foreclosure, as well as to help veterans.

In describing his platform, he said, “Our country desperately needs a president with a depth of global experience and an understanding of all the elements of our nation’s power, from our economy and our diplomacy to the power of our ideals and our military, including its limitations.”

Referring to President Trump, Mr. Sestak said: “The president is not the problem. He is the symptom of the problem people see in a system that is not fair and accountable to the people.”