Over the weekend, the married father of three denied the allegations.
Within hours of the accusations surfacing on Friday, Swalwell lost the backing the backing of prominent supporters for his gubernatorial run and many of his staff members resigned.
Prosecutors in Manhattan then said they were opening a probe into his conduct. On Capitol Hill, the House ethics committee began its own investigation, while Republicans vowed to expel him from the chamber.
In his resignation letter, Swalwell said it would be wrong for fellow lawmakers to expel him “without due process, within days of an allegation being made”.
He added: “But it’s also wrong for my constituents to have me distracted from my duties. Therefore I plan to resign my seat in Congress.”
Swalwell said he plans to “work with my staff in the coming days to ensure they are able, in my absence to serve the needs of the good people” in his district, which stretches east of San Francisco.
No clear leader has yet emerged in the highly-watched California governor’s race from the crowded Democratic field, which risks splitting the vote for the party’s candidates in the state’s primary in June. Among Democratic candidates, Swalwell had been projected to be one of the frontrunners, according to two opinion polls.
Unlike many states, California holds an “open” primary, meaning voters can select candidates from any party. The top two vote-getters in the primary move on to the 3 November general election regardless of party preference.
That has raised a terrible prospect for Democrats, who currently control the state legislature and governor’s mansion: they could be frozen out of November’s general election if the two Republican candidates finish ahead of them in June’s primary.
