The AFL-CIO, which represents 12 million union members across all sectors of the economy, announced Thursday it would back the former secretary of state. The union had withheld its endorsement for the entirety of the Democratic primary.

"Hillary Clinton is a proven leader who shares our values," AFL-CIO President Richard Trumka said in a release. "Throughout the campaign, she has demonstrated a strong commitment to the issues that matter to working people, and our members have taken notice. The activism of working people has already been a major force in this election and is now poised to elect Hillary Clinton and move America forward."

The group’s executive board, which is made up of the heads of member organizations and local leaders, voted to back Clinton after she clinched the Democratic nomination with the help of superdelegates—political insiders who are allowed to cast votes independent of primary or caucus results. The endorsement required a two-thirds majority, according to the release.

The AFL-CIO endorsement followed a pattern of other labor endorsements in the Democratic primary fight. An analysis of labor endorsements by The Intercept found that Clinton managed to win support when union leadership voted while Sanders won when the decision was left to union members.

"Every major union or progressive organization that let its members have a vote endorsed Bernie Sanders," the report said. "It’s perhaps the clearest example yet of Clinton’s powerful appeal to the Democratic Party’s elite, even as support for Sanders explodes among the rank and file."

Clinton won the support of several labor unions, including the American Federation of Teachers and the International Association of Machinists and Aerospace Workers (IAM), in the summer of 2015. Those endorsements proved vital in establishing her as an "inevitable" candidate, but Sanders’ popularity among workers led to distrust between union members and their leaders. Many activists publicly complained that the endorsement ignored the will of membership.

"The IAM is a great union and I am very proud to be a member. But the leaders went about this endorsement the wrong way," one member wrote on the union’s Facebook wall in August.

Trumka praised Sanders in a release but said union leadership voted to back Clinton because she was a stronger candidate.

"Senator Bernie Sanders has brought an important voice to this election, and has elevated critical issues and strengthened the foundation of our movement. His impact on American politics cannot be overstated," he said. "Hillary Clinton has proven herself as a champion of the labor movement and we will be the driving force to elect her President of the United States."

Labor critics and union watchdogs said that Clinton’s embrace of the AFL-CIO demonstrates her embrace of outdated labor laws. The Enterprise Freedom Action Committee, a free market group, said that Clinton has chosen to ally herself with the politically powerful rather than the average worker. The committee called on her to spurn the endorsement and get behind the Employee Rights Act, a piece of evergreen legislation that would allow workers to opt out of coercive union membership.

"For years, Hillary Clinton has claimed to support workers’ rights. Yet she refuses to support the Employee Rights Act," executive director Richard Berman said in a release. "If Clinton truly believed in workers’ rights, then she would endorse the most pro-employee labor legislation since the 1940s."

The union pledged to boost the Clinton campaign on the ground, providing volunteers to knock on doors and rally support for her candidacy. The endorsement will also provide Clinton with even more money. The union gave Democratic candidates more than $9 million in the 2012 elections, according to the Center for Responsive Politics. Its super PAC, which spent nearly $22 million to help President Obama in 2012, has already raised about $4.5 million in 2016.