Donald H. Rumsfeld, whose roles overseeing the U.S. invasions of Afghanistan and Iraq and efforts to transform the U.S. military made him one of history’s most consequential as well as controversial Pentagon leaders, died June 29 at his home in Taos, N.M. He was 88.

The cause was multiple myeloma, said his former chief of staff Keith Urbahn.

Mr. Rumsfeld’s political prominence stretched back to the 1960s and included stints as a rebellious young Republican congressman, favored counselor to President Richard M. Nixon, right-hand man to President Gerald Ford and Middle East envoy for President Ronald Reagan. He also scored big in business, helping to pioneer such products as NutraSweet and high-definition television and earning millions of dollars salvaging large troubled firms.

His greatest influence and notoriety came during a six-year reign as defense secretary under President George W. Bush. Mr. Rumsfeld was initially hailed for leading the U.S. military to war in the wake of the Sept. 11, 2001, terrorist attacks, but his handling of the Iraq War eventually led to his downfall. In the invasion’s aftermath, he was criticized for being slow to draft an effective strategy for countering an Iraqi insurgency. He also failed to set a clear policy for the treatment of prisoners.

Dogged for months by mounting calls for Mr. Rumsfeld’s removal, Bush finally let him go in late 2006 — 31/2 years into the Iraq War and just after an election in which the Republicans lost control of both chambers of Congress. Mr. Rumsfeld’s forced exit under clouds of blame and disapproval cast a shadow over his previously illustrious career.

Nevertheless, in a statement on Wednesday, Bush praised Mr. Rumsfeld as “a man of intelligence, integrity, and almost inexhaustible energy” who “never paled before tough decisions, and never flinched from responsibility.”

None of Mr. Rumsfeld’s predecessors had come into the Pentagon’s top job with as much relevant experience. Having served as defense secretary once before under Ford, Mr. Rumsfeld was the only person ever to get a second shot at the position. He held the record as the youngest Pentagon leader, then under Bush, he became the oldest.

Mr. Rumsfeld was more complex and paradoxical than the public caricature of him as a pugnacious, inflexible villain would suggest. A Midwestern conservative, he nonetheless exhibited a persistent drive throughout his life to shake up the institutions in which he served. A hawk on defense, he strongly supported civil rights legislation as a young congressman, worked on anti-poverty programs under Nixon and promoted microenterprises as a wealthy investor.

At the Pentagon, he ruled with a strong hand, persistently challenging subordinates, poring over details of troop deployments and insisting on a greater role in the selection of top officers than his predecessors had exercised. While capable of great charm and generosity, he often seemed to undercut himself with a confrontational, gruff and belittling manner that many found offensive. Senior officers complained that he treated them harshly, legislators groused that he was either unresponsive to their requests or disrespectful in personal dealings, and senior officials at the State Department and the White House portrayed him as uncompromising, evasive and obstructive.

“He wielded a courageous and skeptical intellect,” Douglas Feith, Mr. Rumsfeld’s senior civilian policy adviser at the Pentagon, wrote in a memoir. “But his style of leadership did not always serve his own purposes: He bruised people and made personal enemies, who were eager to strike back at him and try to discredit his work.”

In the 2008 presidential campaign, Sen. John McCain (Ariz.), the Republican candidate, labeled Mr. Rumsfeld the worst defense secretary ever. But others, such as James Schlesinger — himself a former defense secretary — offered a more measured appraisal, giving Rumsfeld high marks for trying to revamp the military but grading him low as a “secretary of war.”

When Mr. Rumsfeld took over at the Pentagon in 2001, Bush charged him with reforming the military bureaucracy to create more agile, adaptable armed forces. He proclaimed “transformation” as his main slogan and made a point of challenging traditional assumptions, insisting on the need for new principles of warfare and new weaponry to confront terrorism and other emerging threats.

At first, the invasion of Afghanistan in October 2001, with its heavy reliance on airpower combined with limited numbers of U.S. Army Special Forces, appeared to validate Mr. Rumsfeld’s vision. The invasion also transformed Mr. Rumsfeld into a popular national figure. He had gotten off to a rocky start as defense secretary by alienating a number of officers, lawmakers and administration colleagues. But thrust into the role of war leader, with his blunt talk and commanding style, Mr. Rumsfeld suddenly seemed made to order for the part.

His wit, directness and folksy language were put on display as the Bush administration’s most spirited spokesman. Capable of being antagonistic and humorous at once, he could speak of killing the enemy on the battlefield, then muse about “known knowns” and “known unknowns” in gathering intelligence.

In the wake of the Afghan invasion, Mr. Rumsfeld hoped to devise a similarly innovative war plan for toppling Saddam Hussein’s regime in Iraq. He expected U.S. troops to stay in Iraq for only a short time, expecting to hand over responsibility for governing the country to an interim Iraqi authority. A number of his key assumptions and early judgments proved wrong.

He played down the scale and significance of widespread looting that immediately followed the invasion. During the first year of occupation, he left command of U.S. troops in Iraq in the hands of an ill-prepared group led by the Army’s newest three-star general. And he went along with a rushed move to disband the Iraqi military and build a new set of Iraqi security forces from scratch.

Moreover, Mr. Rumsfeld took issue with warnings that the conflict in Iraq could become a protracted guerrilla war, dismissing enemy fighters as little more than “dead-enders” from the Hussein era. Eventually, Mr. Rumsfeld recognized that a tenacious insurgency had taken root, but as the violence worsened through 2004, 2005 and 2006, he — along with his top military commanders — resisted arguments that the U.S. troop level in Iraq should be raised. He argued that Iraq needed to avoid developing a long-term dependence on the United States. But in the process, he underestimated the pace at which Iraq’s new security and political structures could establish themselves.

Mr. Rumsfeld’s toughness won him respect among a number of senior field officers. He tended to grant commanders broad rules of engagement, backing up troops when things went wrong. “He was the kind of guy you wanted on the other end of the phone,” recalled retired Gen. George Casey, who headed U.S. forces in Iraq.

But all too often, Mr. Rumsfeld came across as insensitive to strains on the U.S. military. In one much-publicized incident during a visit to Kuwait in late 2004, he told Army reservists, who were concerned about inadequate armor on their vehicles, that “you go to war with the Army you have.”

Despite an ever greater toll on Pentagon personnel and equipment, Mr. Rumsfeld never let up on his signature drive to transform the military. Against criticism that he was trying to do too much at once, he argued that war gave his campaign for change even greater urgency.

During his tenure, the Army restructured itself into more flexible, more easily deployable units. War plans were rewritten to emphasize speed, to require fewer troops and to reposition U.S. forces around the world, as Cold War bases in Europe and Asia were closed. He revamped the military intelligence apparatus and rearranged the military’s regional and functional commands to adjust to new dangers.

But Mr. Rumsfeld never achieved many of the far-reaching reforms called for by his transformational rhetoric. Only two major weapons systems were canceled on his watch: the Army’s Crusader artillery system and the RAH-66 Comanche armed reconnaissance helicopter. At his final town-hall-style meeting with Pentagon employees, Mr. Rumsfeld gave himself a grade of only five on a scale of 10 in achieving concrete progress.

Donald Henry Rumsfeld was born July 9, 1932, in Chicago. His father was a real estate agent, his mother a part-time schoolteacher. Except for a few years during World War II, when his father was in the Navy, Mr. Rumsfeld spent most of his childhood in Chicago’s North Shore suburbs. He was an Eagle Scout and excelled at wrestling in high school.

Known as “Rummy,” he was a popular student, but classmates also considered him intense and inwardly driven. He mused openly about possibly becoming president of the United States.

Entering Princeton University on a scholarship, Mr. Rumsfeld studied politics and was especially inspired by an idealistic speech delivered at Princeton in the spring of his senior year by Adlai E. Stevenson II, Illinois governor and Democratic presidential candidate. Stevenson called on the students to apply their education to the nation’s service. For years afterward, Mr. Rumsfeld could quote whole sections of the speech.

Mr. Rumsfeld made a number of close, lasting friendships at Princeton and earned some prominence — he was wrestling team captain and a member of Cap and Gown, one of the school’s top-tier eating clubs — yet he never overcame the sense of economic and class division that he felt as a public school youth from a middle-class background.

Long after leaving college, he carried a lingering disdain of Ivy Leaguers and the Eastern establishment elite. “He’d call them ‘reversible names’ — people with initials and all that kind of stuff,” said Ken Adelman, who met Mr. Rumsfeld in Washington in the late 1960s and became a close friend. “We talked about that hundreds of times.”

Around the time of his graduation in 1954, Mr. Rumsfeld was engaged to Joyce Pierson. The two had dated in high school, then gone separate ways, with Joyce attending college in Colorado. But they had maintained an on-again, off-again relationship.

They were married in December 1954, and Joyce remained her husband’s closest confidante. Friends often remarked that her sociability and effervescence often balanced Mr. Rumsfeld’s sharper edges and served to anchor him.

In addition to his wife, survivors include three children, Valerie Richards, Marcy Rumsfeld and Nick Rumsfeld; seven grandchildren; and three great-grandchildren.

Fulfilling an ROTC scholarship commitment after leaving Princeton, Mr. Rumsfeld served as a Navy pilot before landing jobs in Washington assisting two Republican lawmakers — first Rep. David Dennison of Ohio and then Rep. Robert Griffin of Michigan.

When a chance to run for his own seat opened up on Chicago’s North Shore, Mr. Rumsfeld leaped at it. Drawing on a network of schoolmates in the area, he scored an upset win in the 1962 primary against the GOP establishment’s pick and entered the House of Representatives in 1963 as the youngest Republican member.

On many issues, Mr. Rumsfeld shared the views of other young Republican conservatives in the House at the time. He also had a reformist streak, reflecting a deep-seated restlessness and dissatisfaction with the status quo that was manifest through the rest of his life. He described himself, years later, as “genetically impatient.”

He got involved with a group of younger House members, soon dubbed “Rumsfeld’s Raiders,” who pushed for a larger role in the party’s hierarchy. Their biggest success came in the wake of widespread GOP losses in 1964, when they helped oust Charles Halleck of Indiana as the House GOP leader and replaced him with Ford of Michigan.

In time, Mr. Rumsfeld emerged as a strong supporter of civil rights, a proponent of greater openness in government and a critic of the Vietnam War. He was among the first in Congress to oppose the military draft, arguing for the establishment of an all-volunteer force. His hallmark issue remained congressional reform, which he pursued with typical brashness and determination. He even set a filibustering record in 1968, delaying House action on a bill through an entire night to call attention to reform legislation he favored.

Despite his prominence in the House, Mr. Rumsfeld was unable to obtain the more senior committee assignments he sought, suspecting old guard members of maneuvering against him. In 1969, he jumped to the executive branch, accepting an offer from the newly elected Nixon to head the troubled Office of Economic Opportunity, a freewheeling collection of anti-poverty programs.

Nixon had promised to rein in the OEO. But Mr. Rumsfeld, while imposing tighter controls and scaling back some aspects of the organization, proved a surprisingly strong defender of the agency’s need to exist.

While at OEO, Mr. Rumsfeld hired a young Capitol Hill staff aide named Richard B. Cheney to be his top assistant. The move began a storied relationship that spanned the Nixon and Ford administrations and had major consequences for George W. Bush’s presidency, where Cheney, as vice president, became Mr. Rumsfeld’s most powerful ally and staunchest defender.

Some of Nixon’s top aides were put off by Mr. Rumsfeld’s ambition and self-promotion. Nixon was impressed with Mr. Rumsfeld’s toughness and drive, once describing him, admiringly, as a “ruthless little bastard.” He brought Mr. Rumsfeld into the White House as a presidential counselor, considered him for various Cabinet positions, then made him head of the Cost of Living Council for a year before sending him abroad as ambassador to NATO.

Following Ford’s ascension to the presidency in 1974, Mr. Rumsfeld returned to Washington as White House chief of staff — an assignment that placed him at the center of one of the most wrenching governmental changeovers in U.S. history.

“Clearly, the toughest job I’ve ever had,” he declared in an interview years later. “You had a president who’d never run for the office, who’d never been an executive, who didn’t have a campaign team, didn’t have a platform. And you had a White House that was deemed, unfairly in many respects, not legitimate.”

Mr. Rumsfeld was identified in news media reports then as an up-and-comer. New York Times columnist James Reston advised readers “to keep your eye on ‘Rummy.’  ” Indeed, it was in Ford’s White House that Mr. Rumsfeld showed a keen skill for organizing and enhanced his reputation as a disciplined, effective manager. But his clashes with other top officials — among them Vice President Nelson Rockefeller, Secretary of State Henry Kissinger and Treasury Secretary William Simon — also furthered an image of him as a combative and crafty operator focused primarily on advancing his own interests.

Working long hours at a stand-up desk in a large West Wing office, Mr. Rumsfeld was known as a demanding boss who handed out few compliments. As in later jobs, he often communicated to staff with memos that were dictated into a recording device and transcribed by secretaries. By the Bush years, Mr. Rumsfeld’s memos, dubbed “snowflakes,” came in a constant flurry.

Rarely shy about dispensing advice, Mr. Rumsfeld as White House chief of staff began distributing a list of do’s and don’ts on serving and surviving in government and elsewhere. Over the rest of his life, the list — a mixture of proverbs, aphorisms, jokes and clever quotations — grew into a lengthy compendium known as “Rumsfeld’s Rules.” He published a book with that title in 2013. Its first precept was “Learn to say, ‘I don’t know.’ ”

In late 1975, Ford named Mr. Rumsfeld defense secretary, giving him the kind of senior Cabinet post he had long coveted. He used his new authority to play up a mounting Soviet threat and press for a surge in U.S. defense spending. He also squared off against Kissinger, opposing the secretary of state’s quest for a new U.S.-Soviet agreement limiting strategic weapons.

Mr. Rumsfeld’s hard-line stance may simply have reflected his genuine disagreement over the substance of the arms talks. Some saw him driven by political considerations, particularly a desire to burnish his own conservative credentials. In any case, the hawkish posture that he assumed as Ford’s defense secretary defined the rest of his political career.

After Ford’s presidency, Mr. Rumsfeld accepted a distress call from the Searle family of Chicago to take charge of their giant pharmaceutical firm, G.D. Searle & Co., which had grown overly diverse and increasingly less profitable. The Searles had been early supporters of Mr. Rumsfeld when he ran for Congress.

Mr. Rumsfeld took an ax to the company, selling off at least 20 subsidiaries, dismissing hundreds of employees and refocusing the remaining elements on several core operations. Toward subordinates at the firm, he displayed the same demanding, hard-driving style that he had shown managing the White House and the Pentagon. In 1980, Fortune magazine included Mr. Rumsfeld in a lineup of the nation’s “ten toughest bosses.”

Searle’s balance sheet improved significantly, helped by Mr. Rumsfeld’s success in bringing to market the artificial sweetener aspartame, better known by its brand names NutraSweet and Equal. Before Mr. Rumsfeld arrived at the company, the Food and Drug Administration had blocked aspartame amid warnings from scientists and consumer advocates that it might produce brain tumors or pose other health risks. Mr. Rumsfeld revised the company’s lab practices and put together a lobbying effort that successfully gained FDA approval for the sweetener and a congressional extension of the patent for it.

In 1985, the sale of Searle to Monsanto transformed Mr. Rumsfeld into a multimillionaire. He earned millions more in the early 1990s when he managed the turnaround of General Instrument, a cable and satellite-television equipment company involved in developing high-definition TV. He also played a leading role in, and profited from, the growth of Gilead Sciences, a maker of anti-flu and other medications.

Even while in business, Mr. Rumsfeld maintained his interest in politics and government, campaigning for Republican candidates, serving on various advisory panels and, in late 1983, accepting a six-month post as Reagan’s envoy to the Middle East. That job brought him face to face with Saddam Hussein as part of a U.S. effort to reconcile with the Iraqi leader. The cordial encounter, captured in a photo showing the two men shaking hands, became a source of some awkwardness for Mr. Rumsfeld 20 years later when, as defense secretary, he helped make the case for invading Iraq.

On several shortlists over the years as a possible vice president, Mr. Rumsfeld made his own bid for the presidency after the sale of Searle, hoping to succeed Reagan. His campaign generated little financial support, and he withdrew from the race in April 1987. Nearly a decade later, he served as national chairman of Republican candidate Robert Dole’s presidential campaign.

After leaving government service for the last time in 2006, Mr. Rumsfeld established a charitable foundation that focused on supporting military families, microenterprises in developing countries and the former Soviet-controlled republics of Central Asia.

In a 2011 memoir, “Known and Unknown,” he sidestepped some of his own misjudgments and mismanagement and took to task a number of others — the CIA, the State Department and the Coalition Provisional Authority — for their errors in the invasion and occupation of Iraq.

Another of his books, “When the Center Held” (2018), reflected on his years in the Ford administration. His praise of Ford’s “honesty, integrity, and basic human decency” was taken by some reviewers as an implied criticism of President Donald Trump

In 2016, Mr. Rumsfeld helped develop a digital app, based on a complicated form of solitaire played by former British leader Winston Churchill.

“On the one hand it’s dangerous to do something: It’s risky, it’s not certain, as Churchill pointed out,” Mr. Rumsfeld said at the time. “But on the other hand, not doing something is equally dangerous.”

Matt Schudel contributed to this report.