Britain will have a record number of female members of Parliament after Thursday’s vote, when women won at least 220 of the 650 seats, according to the Press Association.

At just over one-third of the House of Commons, women remain far short of parity with men, but they have made tremendous gains since the mid-1980s, when there were only 23 in Parliament. In the last general election, in 2017, women won 211 seats, a record at the time.

This year’s increase comes at a time when many people feared that women were being driven away from politics in a climate of heightened divisions. Online threats and abuse have risen sharply and were disproportionately directed at female candidates.

Ahead of the campaign, more than a dozen prominent female lawmakers said they would not stand for re-election citing that abuse as a reason for stepping away from politics. Many female candidates described threats and insults as a grim new reality on the campaign trail, a change that cast a harsh light on British politics.

An analysis of Twitter during the campaign, conducted by PoliMonitor, showed that all candidates received about four times as much abuse as in the 2017 election. The hostility aimed at women, the study said, was often based specifically on their sex or appearance.

Reporting was contributed by Richard Pérez-Peña, Megan Specia, Benjamin Mueller, Steven Erlanger, Ceylan Yeginsu, Amie Tsang, Stephen Castle, Elian Peltier, Peter S. Goodman, Raphael Minder, Iliana Magra and Alan Yuhas.