The US senate has 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 Mr 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 organisations pushing charter schools.
Ms DeVos has said she would divest herself from those organisations.
Republicans Susan Collins, of Maine, and Lisa Murkowski, of Alaska, fear that Ms DeVos's focus on charter schools will undermine remote public schools in their states.
Despite the win, Ms 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 of 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, Senator Patty Murray, of Washington state, the top Democrat on the Health, Education, Labour and Pensions Committee, urged her Republican colleagues to vote against Ms 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," Ms Murray said.
Senate majority leader Mitch McConnell said Ms 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," Mr 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 Ms DeVos's comment during her confirmation hearing that some schools might want guns to protect against grizzlies.
Her opponents also charge that Ms DeVos has no experience to run public schools, having never attended one or sent her children to a public school.
Ms DeVos has provided few details about her policy agenda, but she is sure to have a busy job.
Ms DeVos 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 criticised by Republicans as federal overreach. Rules on such things as accountability have already been on hold.
She will have to address several 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 Ms DeVos deals with sexual assault and freedom of speech on campuses.
Ms DeVos will also have to react to Mr Trump's campaign proposal of funnelling 20 billion dollars of public funds towards school vouchers.
In addition to Ms DeVos, Republicans hope to confirm a series of other divisive nominees this week: Alabama Republican Senator Jeff Sessions as attorney general, GOP Representative 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 late-night votes this week and delay Mr Mnuchin's approval until Saturday.
Republicans complain that previous presidents have been able to put their cabinets in place more quickly.
Democrats say it is Mr 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, defence, homeland security and transportation.
The clash over nominees has created a toxic atmosphere in the senate that mirrors the tense national mood since Mr Trump's election, with Democrats boycotting committee votes and Republicans unilaterally jamming nominees through committee without Democrats present.
Yet there is 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.