Colin L. Powell, who served as the nation’s top soldier, diplomat, and national security adviser for four decades and whose speech at the United Nations in 2003 helped pave the way for the US to go to war in Iraq, died on Monday. He was 84 years old.

He died of Covid-19 complications, according to his family, who added that he had been vaccinated and was treated at Walter Reed National Military Medical Center in Bethesda, Md., where he died. Mr. Powell had been treated for multiple myeloma, which had weakened his immune system, according to a spokeswoman. Mr. Powell blazed a trail as the country’s first Black national security adviser, chairman of the Joint Chiefs of Staff, and secretary of state. Mr. Powell exemplified the ability of minorities to use the military as a stepping stone to success during his 35 years in the Army.

His was the archetypal American success story. Mr. Powell was born in Harlem to Jamaican parents and grew up in the South Bronx before attending City College of New York and joining the Army through ROTC. Mr. Powell served two decorated combat tours in Vietnam, beginning as a young second lieutenant commissioned in the early days of a newly desegregated Army. Later, at the end of the Cold War, he served as President Ronald Reagan’s national security adviser, helping to negotiate arms treaties and an era of cooperation with Soviet President Mikhail Gorbachev.

As Chairman of the Joint Chiefs of Staff, he oversaw the invasion of Panama in 1989 and the Persian Gulf War in 1991, which deposed Saddam Hussein in Kuwait but left him in power in Iraq. Mr. Powell, along with then-Defense Secretary Dick Cheney, reshaped the American Cold War military that had been stationed at the Iron Curtain for half a century. In doing so, he imprinted the Powell Doctrine on military operations: identify clear political objectives, gain public support, and defeat enemy forces with decisive and overwhelming force.

Mr. Powell succinctly summarized the military’s approach when briefing reporters at the Pentagon at the start of the Gulf War: “Our strategy in going after this army is very simple,” he said. “We’re going to cut it off first, and then we’re going to kill it.”

It was a concept that seemed less well-suited to the messy conflicts in the Balkans that emerged later in the 1990s, as well as combating terrorism in a world transformed by the September 11, 2001 attacks.

Mr. Powell was the most popular public figure in America by the time he retired from the military in 1993, owing to his forthrightness, leadership qualities, and ability to speak in blunt tones that Americans appreciated.

Mr. Powell analyzed himself in a 2007 interview with The New York Times: “Powell is a problem solver.” As a soldier, he was taught how to solve problems. So he has opinions, but he isn’t an ideologue. He has zeal, but he is not a zealot. He’s a problem solver first and foremost.”

Mr. Powell, who had been a lifelong independent while in uniform, was courted as a presidential candidate by both Republicans and Democrats after retiring, and he became America’s most political general since Dwight D. Eisenhower. He wrote a best-selling memoir, “My American Journey,” and considered running for president before deciding in 1995 that campaigning wasn’t for him.

In 2001, he returned to public service as Secretary of State under President George W. Bush, whose father, Mr. Powell, had served as Chairman of the Joint Chiefs of Staff a decade before. Mr. Powell followed in the footsteps of one of his heroes, Gen. George Marshall, who served as Secretary of State under Presidents Franklin D. Roosevelt and Harry S. Truman.

But, in the Bush administration, Mr. Powell was the odd man out, competing for President Bush’s ear and foreign policy dominance with Vice President Dick Cheney and Defense Secretary Donald H. Rumsfeld.