WASHINGTON (Reuters) - President Donald Trump’s choice of billionaire Betsy DeVos to be education secretary was confirmed by the U.S. Senate on Tuesday, but only after Vice President Mike Pence was called in to break a tie that threatened to defeat her.

The tie-breaking vote, which Senate officials said was unprecedented to confirm a Cabinet nominee, followed an all-night debate on DeVos as Senate Democrats tried to pressure at least one more Republican to oppose her and defeat the nomination.

Only two Republicans joined the 46 Democrats and two independents in opposition to DeVos. Critics have called her unprepared to lead the Department of Education after a rocky Senate confirmation hearing.

Senate Democratic leader Chuck Schumer immediately derided the proceeding.

“This cabinet nom is so unqualified, so divisive, that @MikePenceVP had to drive down Pennsylvania Ave to cast the deciding vote,” he wrote in a Twitter post after the vote.

Under the U.S. Constitution, the vice president also serves as president of the Senate, with the power to cast votes only when there are ties on nominations or legislation.

Republican Trump tweeted his congratulations to the nominee and Pence praised her. “Today’s vote to confirm Education Secretary @BetsyDeVos was a vote for every child having a chance at a world-class education,” the vice president wrote in a Twitter post.

Ultimately, only Republican Senators Susan Collins of Maine and Lisa Murkowski of Alaska joined the Democrats and two independents in opposition to DeVos. That left 50 Republicans supporting her in the 100-member chamber.

Historically, Cabinet nominees with weak support in the Senate ask the president to withdraw their nomination, which DeVos did not do.

U.S. Vice President Mike Pence (R) swears in Education Secretary Betsy DeVos (L), joined by her husband Dick DeVos (2nd L), at the Eisenhower Executive Office Building at the White House in Washington, U.S. February 7, 2017. REUTERS/Jonathan Ernst

DeVos is married to the heir and former chief executive of Amway, which sells household and personal care items. She is also the daughter of the founders of Prince Corp, a Michigan car parts supplier, and sister of Erik Prince, the founder of the security company formerly known as Blackwater USA, now called Academi.

As Monday night’s debate wound down, Schumer said of DeVos: “She disdains public education where 90 percent of our students are.”

Senate Majority Leader Mitch McConnell, urging her confirmation, said it was time to “end the unprecedented delay by Democrats” on the Cabinet nominations by Trump, who took office on Jan. 20.

DeVos has been an advocate of charter schools, which operate independently of school districts and frequently are run by corporations. Democrats are concerned she will promote charter schools in a way that would undercut public schools, which have long been the anchor of the U.S. education system.

Teachers unions, a major constituency for the Democratic Party, roundly opposed DeVos, a philanthropist and investor, to lead the department, which sets education policy for younger children and universities and also administers a college financial aid program of $1 trillion.

The Consumer Federation of America urged DeVos to confront the problem of millions of Americans in default on student loans. “The new secretary needs to put borrowers and taxpayers first, rather than focusing on helping the student loan and for-profit college industries pump up their profits,” it said.

Following the cliffhanger vote on DeVos, the Senate promptly limited debate on Trump’s choice of Senator Jeff Sessions to be attorney general. A final vote on Sessions’ nomination is expected sometime this week.

Also up for Senate debate soon are Trump’s nominations of Representative Tom Price to be secretary of Health and Human Services and ex-banker Steve Mnuchin to be Treasury secretary.

All three face opposition from Senate Democrats.

Also facing a rough ride is Trump’s choice of Andrew Puzder to be secretary of labor. Puzder, the chief executive of CKE Restaurants Inc, has admitted to employing an undocumented immigrant as a house cleaner.