WASHINGTON — The Senate on Tuesday confirmed school choice advocate Betsy DeVos as Education secretary by the narrowest of margins, with Vice President Mike Pence breaking a 50-50 tie in a historic vote.

Two Republicans joined Democrats in the unsuccessful effort to derail the nomination of the wealthy Republican donor. The Senate historian said Pence’s vote was the first by a vice president to break a tie on a Cabinet nomination.

Democrats cited her lack of public school experience and financial interests in organizations pushing charter schools. DeVos has said she would divest herself from those organizations.

Republicans Susan Collins of Maine and Lisa Murkowski of Alaska fear that DeVos’ focus on charter schools will undermine remote public schools in their states.

Despite the win, DeVos emerges bruised from the highly divisive nomination process. She has faced criticism, even ridicule for her stumbles and confusion during her confirmation hearing and scathing criticism from teachers unions and civil rights activists over her support of charter schools and her conservative religious beliefs.

But President Donald Trump remained uncompromising and accused Democrats for seeking to torpedo education progress. In a tweet before the vote, he wrote “Betsy DeVos is a reformer, and she is going to be a great Education Sec. for our kids!”

After an all-night speaking marathon by Democrats, Sen. Patty Murray of Washington state, the top Democrat on the Health, Education, Labor and Pensions Committee urged her Republican colleagues to vote against DeVos, calling her unqualified and saying that she will be a poor advocate for low income families and students with disabilities who rely on public education.

“We are just within one vote of sending this nomination back and asking the president to send us a nominee that can be supported by members on both sides of the aisle, that can set a vision that can fight for public schools, that can be that champion,” Murray said.

Senate Majority Leader Mitch McConnell said DeVos will seek to empower states, not federal bureaucrats, to make important education decisions.

“I know that she is committed to improving our education system so that every child — every child — has a brighter future,” McConnell said ahead of the vote.

Emotions ran high ahead of the vote as constituents jammed senators’ phone lines with calls and protesters gathered outside the Capitol, including one person in a grizzly bear costume to ridicule DeVos’ comment during her confirmation hearing that some schools might want guns to protect against grizzlies. Her opponents also charge that DeVos has no experience to run public schools, having never attended one or sent her children to a public school.

DeVos has provided few details about her policy agenda, but she is sure to have a busy job. She will have to weigh in on the implementation of the Every Student Succeeds Act and possibly undo some of the previous administration’s regulation initiatives on school accountability and spending, which have been criticized by Republicans as federal overreach. Rules on such things as accountability already have been on hold.

She will have to address several hot-button issues in higher education, such as rising tuition costs, growing student debt and the troubled for-profit colleges, many of which have closed down, leaving students with huge loans and without a good education or job prospects. Observers will pay close attention to how DeVos deals with sexual assault and freedom of speech on campuses.

DeVos will also have to react to Trump’s campaign proposal of funneling $20 billion of public funds toward school vouchers.

In addition to DeVos, Republicans hope to confirm a series of other divisive nominees this week: Alabama Republican Sen. Jeff Sessions as attorney general, GOP Rep. Tom Price of Georgia as health secretary and financier Steven Mnuchin as treasury secretary.

In each case Democrats intend to use the maximum time allowed under the Senate’s arcane rules to debate the nominations, which may result in a late-night votes this week and delay Mnuchin’s approval until Saturday.

Republicans complain that previous presidents have been able to put their Cabinets in place more quickly. Democrats say it’s Trump’s fault because many of his nominees have complicated financial arrangements and ethical entanglements they claim they have not had enough time to dissect. Thus far, six Cabinet and high-level officials have been confirmed, including the secretaries of state, defense, homeland security and transportation.

The clash over nominees has created a toxic atmosphere in the Senate that mirrors the tense national mood since Trump’s election, with Democrats boycotting committee votes and Republicans unilaterally jamming nominees through committee without Democrats present. Yet there’s little suspense about the final outcome on any of the nominees because Democrats themselves changed Senate rules when they were in the majority several years ago so that Cabinet nominees can now be approved with a simple majority, not the 60 votes previously required.