WASHINGTON — Education Secretary Betsy DeVos submitted her resignation Thursday, citing the president’s role in the riot on Capitol Hill.

“There is no mistaking the impact your rhetoric had on the situation, and it is the inflection point for me,” she wrote in a letter to President Donald Trump. The behavior of the “violent protesters overrunning the U.S. Capitol” was “unconscionable,” she wrote.

“Impressionable children are watching all of this, and they are learning from us. I believe we each have a moral obligation to exercise good judgment and model the behavior we hope they would emulate,” she wrote. “They must know from us that America is greater than what transpired yesterday.”

She said her resignation is effective Friday. The resignation, she said was “in support of the oath I took to our Constitution, our people, and our freedoms.”

DeVos had been one of Trump’s most loyal and longest serving Cabinet secretaries, and also one of his most controversial, despised by many on the left. In recent days, though, even as Trump disputed the election results, DeVos acknowledged that Joe Biden had defeated him.

DeVos joined several other Trump administration officials who quit with less than two weeks left in Trump’s term, in protest of the violence that unfolded Wednesday.

Earlier in the day, Elaine Chao — who is married to Senate Majority Leader Mitch McConnell, R-Ky.-also resigned as transportation secretary, saying she was “deeply troubled” by what had happened at the Capitol. In addition, Mick Mulvaney quit his job as the U.S. special envoy for Northern Ireland.

DeVos served as secretary for almost the entire Trump term, holding onto her job even as a string of other senior officials left or were pushed out. She rarely said anything that could be read as a criticism of Trump.

A billionaire, DeVos had never held public office before being named to this job, though she had worked in Republican politics in Michigan, and had worked nationally to promote school choice initiatives, the cause of her life.

She used her tenure to promote school choice — the use of taxpayer dollars to support alternatives to traditional public school such as charter schools and school vouchers. That agenda did not go very far on the federal level, but supporters say her advocacy led to action in several states.

“We have sparked a national conversation about putting students and parents in charge of education, leading to expanded school choice and education freedom in many states,” DeVos wrote in her letter.

She also joined Trump this summer in pushing schools to reopen for in-person classes amid the pandemic. In her letter, she said that history will prove that this was the right call.

DeVos also stirred controversy in rolling back many civil rights initiatives from the Obama administration, such as protections for transgender students. A regulation giving more rights to students accused of sexual harassment and assault was lauded by some but attacked by others, and Biden has vowed to unravel it.

DeVos also drew the ire of advocacy groups for overturning Obama-era regulations to protect college students from bad actors in the for-profit college industry. She spent the early months of her tenure refusing to process applications for student debt cancellation from defrauded borrowers and implement rules to make it easier for them to secure loan forgiveness.

Her defiance led dozens of state attorneys general to sue DeVos and the department. The cases continued to mount as DeVos proceeded to undo consumer protection and sexual assault regulations.

Throughout her tenure, she was fiercely opposed, and even hated, by many Democrats, who said she was unfit for the position in the first place and cared more about supporting private schools than public education. Her difficulty answering tough questions under pressure, starting with her Senate confirmation hearing, cemented her place for many as in over her head. Vice President Mike Pence had to break a tie vote in the Senate in order to confirm her.

Years later, DeVos remained a rallying point on the left, with Democrats invoking her name as they campaigned for office.

The Washington Post’s Danielle Douglas-Gabriel contributed to this report.