John J. Sweeney, a labor official who led the AFL-CIO for 14 years, expanding the union federation’s national reach in politics while presiding over a steady decline in union membership, died Feb. 1 at his home in Bethesda, Md. He was 86.

His death was confirmed by AFL-CIO spokeswoman Carolyn Bobb. The cause was not disclosed.

Mr. Sweeney, who built the Service Employees International Union (SEIU) into the country’s third-largest labor union in the 1980s and 1990s, became president of the AFL-CIO in 1995. He took over the Washington-based trade association that represents the interests of dozens of labor unions after leading a power struggle that forced out the organization’s longtime leader, Lane Kirkland.

“Workers look at their paychecks, the political system, and the public debate,” Mr. Sweeney said at the time, “and wonder, ‘Why is nobody speaking up for me?’ ”

Mr. Sweeney reshaped the AFL-CIO to place greater emphasis on political activism and on recruiting new members to unions. He accomplished his first goal by making the union federation a powerful force in politics, sending thousands of organizers into the field around the country to elect sympathetic lawmakers to local, state and national offices.

Despite falling union membership, Mr. Sweeney harnessed labor’s grass-roots political clout during the 2008 presidential campaign, helping propel Democratic candidate Barack Obama into the White House, aided by victories in union-heavy Pennsylvania and Ohio.

Mr. Sweeney, who had argued for a national health insurance program since the 1980s, was a prominent advocate for the Affordable Care Act, Obama’s signature health-care reform initiative, which was adopted in 2010. He was also an influential voice for other reforms, including the Family and Medical Leave Act, workplace safety measures and federal protection against sexual harassment and discrimination on the job.

At SEIU, Mr. Sweeney expanded the union’s membership by merging with smaller labor units and recruiting tens of thousands of low-income workers, many of whom were women and people of color who had been ignored by traditional labor unions, which were long dominated by White men.

“Because of the union, my father got things like vacation days or a raise in wages,” Mr. Sweeney told the New York Times in 2009. “But my mother, who worked as a domestic, had nobody. It taught me from a young age the difference between workers who are organized and workers who were by themselves.”

During his 15 years at the helm of the SEIU, from 1980 to 1995, Mr. Sweeney oversaw a rare success story in the labor movement of that era. He sometimes used brash tactics to push his message that ordinary workers deserved a larger slice of the country’s wealth.

In the 1980s, he was an architect of the “Justice for Janitors” campaign, in which striking janitorial workers — many of them immigrants — picketed the homes of building owners, blocked streets and, in one instance, shut down the Roosevelt Bridge connecting Washington and Northern Virginia.

Representing a broad range of employees, from lawyers to maintenance and health-care workers, the SEIU topped 1 million members in the early 1990s. As corporate profits and stock prices kept rising, Mr. Sweeney said in a 1996 interview with Nation’s Business that too many business owners were cutting back on employee benefits and leaving their workers left behind “like so much roadkill on the highway of American life.”

When Republicans took control of both chambers of Congress in 1994, Mr. Sweeney sought to refocus the AFL-CIO’s political presence. Unable to persuade Kirkland, who had led the AFL-CIO since 1979, to retire, Mr. Sweeney declared his intent to challenge him for leadership of the organization.

Kirkland reluctantly stepped down, anointing a longtime aide, Thomas R. Donahue — Mr. Sweeney’s onetime mentor — as his successor. In the first contested AFL-CIO presidential election since the organization was formed in 1955 from the merger of the American Federation of Labor and the Congress of Industrial Organizations, Mr. Sweeney defeated Donahue in October 1995.

He announced the ambitious goal of doubling the number of union members nationwide and traveled the country with the message that “America needs a raise.”

When he began working as an organizer in the 1950s, more than a third of the country’s private-sector workers were union members. He was unable to reverse a decades-long trend of dwindling union rolls, accelerated by a shrinking manufacturing base and widespread management opposition to unions. He was even forced to lay off a quarter of the staff at the AFL-CIO headquarters a block from the White House.

In 2005, when the 71-year-old Mr. Sweeney was seeking reelection to another four-year term as AFL-CIO president, he faced an internal challenge led by his onetime protege, Andrew L. Stern, then the leader of SEIU.

Stern and several other union leaders believed the AFL-CIO should spend more on recruitment and charged that Mr. Sweeney was out of touch with the modern workplace. Stern and the dissident unions threatened to leave the AFL-CIO and form a rival federation unless Mr. Sweeney stepped down — just as Mr. Sweeney had sought Kirkland’s ouster a decade before.

Mr. Sweeney won reelection but was left with a fractured organization. Some of the biggest unions, including SEIU, the Teamsters and the United Farm Workers, seceded from the AFL-CIO and formed a competing group called Change to Win. The move deprived Mr. Sweeney’s organization of a quarter of its members and 10 percent of its income.

He served out his term and retired in 2009, succeeded by one of his longtime lieutenants, former United Mine Workers leader Richard Trumka.

John Joseph Sweeney was born May 5, 1934, in the Bronx. Both of his parents were Irish immigrants; his father was a bus driver, his mother a domestic worker.

Mr. Sweeney was 11 when his family moved to Yonkers, N.Y.

“Growing up, I saw what the union meant for my father,” he said in a 2013 speech. “The union won him the wage increases that let him save up $5,000 to buy a home — outside the city, in a promised land called Yonkers.”

Mr. Sweeney worked his way through Iona College in New Rochelle, N.Y., as a gravedigger and maintenance worker. After graduating in 1956, he briefly worked for IBM before taking a pay cut to become a researcher for the International Ladies Garment Workers Union. In 1960, he went to work for a New York local of the Building Service Employees International Union, the forerunner of the SEIU. He became the head of the local in 1976, then moved to Washington in 1980, when he became the union’s national president.

“I see organized labor as a way to social justice, striving to improve the lot of others,” he said in 1976.

Survivors include his wife of 58 years, the former Maureen Power; two children; two sisters; and a granddaughter.

Mr. Sweeney wrote a 2017 memoir and was the co-author of two other books about the labor movement and economic security. Obama awarded him the 2010 Presidential Medal of Freedom in a White House ceremony.

According to the U.S. Bureau of Labor Statistics, the percentage of workers who are union members rose in 2020 from 10.3 percent to 10.8 percent.

“I don’t get upset being referred to as a special interest,” Mr. Sweeney said after taking over the AFL-CIO. “If representing American workers is a special interest, then I’m proud to represent that special interest.”