Betsy Devos a wealthy Republican donor with almost no experience in public education, was confirmed by the Senate as the nation’s education secretary on Tuesday, but only with the help of a historic tie-breaking vote from Vice President Mike Pence after weeks of protests and two defections within her own party.

The 51-to-50 vote capped an all-night vigil on the Senate floor, where, one by one, Democrats denounced Mrs. DeVos to a mostly empty chamber. But they did not get a third Republican defection that would have stopped Mrs. DeVos.

It was the first time a vice president has been summoned to the Capitol to break a tie on a cabinet nomination.