Shannon Stapleton / Reuters Hillary Clinton finally secured the necessary support from member unions after her insurmountable delegate lead recently made her the presumptive nominee.

WASHINGTON -- The country's largest federation of labor unions formally endorsed Hillary Clinton for president on Thursday, assuring that organized labor would devote its considerable resources to keeping a Democrat in the White House for another four years.

The AFL-CIO's board voted to approve a Clinton endorsement after the group's political committee recommended the move on Friday. A clear majority of the AFL-CIO's member unions had already endorsed the likely Democratic nominee on their own, many as early as last year.

But the surprisingly close primary challenge from Sen. Bernie Sanders (I-Vt.) led several major unions to wait out the endorsement process, while a handful chose to back the self-described democratic socialist over Clinton. The former Secretary of State finally secured the necessary support from member unions after her insurmountable delegate lead recently made her the presumptive nominee.

"Hillary Clinton is a proven leader who shares our values,” the AFL-CIO's president, Richard Trumka, said in a statement. "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."

Although most unions had already declared their support for a particular candidate, the AFL-CIO typically does not wade into contested primaries. Instead, it waits until the nomination is more or less buttoned up. A large contingent of fervent Sanders supporters within organized labor -- many of whom criticized their own unions for backing Clinton -- gave the federation yet another reason to wait until his rival had become the presumptive nominee.

It was inevitable that the AFL-CIO would back whoever was the eventual Democratic nominee over real estate mogul Donald Trump, who's expected to be named the GOP nominee next month at the Republican National Convention in Cleveland. Trumka has been carrying out a full-throated assault on Trump for months, calling him an "anti-American bigot,” whose policies would hurt the working class.

Unions consider it imperative that a Republican not succeed President Barack Obama. Organized labor has in recent years sustained legislative attacks in states around the country and on Capitol Hill, where a Republican-controlled Congress controlled has tried for years to weaken them. A White House occupied by a Democrat has been one of labor's few checks against legislation hostile to unions' interests. Trump has voiced support for right-to-work laws, which are anathema to unions. He has mostly said he opposes a minimum wage hike.

In a statement on the Clinton endorsement, Trump said the AFL-CIO "has made clear that it no longer represents American workers."

"Instead they have become part of the rigged system in Washington, D.C., that benefits only the insiders," Trump said. "I believe their members will be voting for me in much larger numbers than for her."

Organized labor does not hold as much political power as it used to; the rate of union membership in the U.S. private sector now stands at just 6.7 percent, hovering near a historic low. But unions still run a considerable ground game during elections, and the Democratic nominee can expect to benefit from the AFL-CIO's advertising buys and get-out-the-vote efforts. The federation's affiliated super PAC, Workers Voice, spent $22 million during the 2012 cycle, according to the Center for Responsible Politics.

This post has been updated with a statement from Trump.