Betsy DeVos has been voted in as education secretary after Vice President Mike Pence cast a rare, tie-breaking vote on the Senate floor.

There were 51 votes in her favour and 50 against.

She was the only cabinet pick to come close to failure after Democrats successfully stalled and delayed her hearing.

The vote came after the Democrats staged a 24-hour protest in the Senate, asking for support from just one more Republican to break the vote in their favour.

In the days before her appointment, congressional switchboards were jammed as people phoned in to protest to their representatives.

Two Republican senators, Susan Collins of Maine and Lisa Murkowski of Alaska, were against her appointment, but a third Republican dissenter was needed.

Mr Pence was filmed running up the steps to the Senate on Tuesday morning to cast his vote for Ms DeVos and ensure a 50-50 tie.

It was the first time in American history that a Vice President's vote was required to break a tie for a cabinet pick.

Jeff Sessions, the incoming Attorney General, also voted in her favour. His confirmation vote was scheduled for just after Ms DeVos to ensure he could take part.

Filings from the Federal Election Commission show that her family previously donated to more than 20 Republicans who voted in her favour.

Ms DeVos tweeted after the vote that she “appreciated the Senate's diligence” and was “honoured” to be appointed.

“Let's improve options and outcomes for all US students,” she tweeted.

She also re-tweeted a social media post from President Trump, who said the Democrats were protesting in order to “keep a failed status quo”.

House speaker Paul Ryan said her appointment was ensuring that schools did not suffer from “innovation-crushing regulations” and that state schools had more control over their educational agenda.

“States and local communities need the flexibility to be able to innovate,” he said in a statement. “These rules crush the spirit of federalism that strengthens schools and helps kids across the country. That’s why we’re repealing them today.”

Democrats accused her of not having any experience in the classroom and being head of an agency that funds free schools, which she is against. She is in favour of school choice and charter schools, which means federal funds could be diverted from free schools and disadvantage the lowest income students further.

Chuck Schumer, the Senate Minority Leader, said she was the “least-qualified nominee in a historically unqualified cabinet”.

“On conflicts of interest she ranks among the worst,” he said on the floor during the all-night filibustering session. “She seems to constantly demand the main purpose of her job: public education.”

Senator Al Franken grilled the billionaire philanthropist during her senate confirmation hearing last month on her thoughts about teaching methods, and said he was surprised that she knew so little of an issue that had been discussed in education for years.

She was asked about proficiency versus growth, and she appeared flustered and asked for clarification.

She has also come under fire for lobbying government for anti-LGBT and anti-abortion bills.

Civil rights groups said they were “deeply concerned” about Ms DeVos, who could dismantle protections for LGBT and transgender students.

Betsy DeVos blames 'clerical error' for years as VP of anti-LGBT foundation

When asked why she served as vice president of an anti-LGBT foundation for years, she said it was a “clerical error”.

Her family has donated hundreds of thousands of dollars to groups that promote “conversion therapy” for gay people.