Senator Elizabeth Warren of Massachusetts declared on Saturday that she would “take a hard look” at running for the White House in 2020 once the midterm elections are over, and called on the country to elect a female president to fix the “broken government” in Washington.

Ms. Warren made the announcement during a town-hall meeting in Holyoke, Mass., where she was decrying President Trump and Senate Republicans for digging in behind Judge Brett M. Kavanaugh, the embattled Supreme Court nominee who has been accused of sexual assault. She described the hearings as a spectacle of “powerful men helping a powerful man make it to an even more powerful position.”

“I watched that and I thought: time’s up,” Ms. Warren said, according to a transcript and video of her remarks provided by an aide. “It’s time for women to go to Washington and fix our broken government, and that includes a woman at the top.”

She continued, “So here’s what I promise: After Nov. 6, I will take a hard look at running for president.”