Rep. Tony Gonzales of Texas said Monday he will retire from Congress after bipartisan calls to expel him, ending a political fight that has centered on his prior admission of an affair with a staff member and a House Ethics Committee inquiry into his conduct.

In a social media post, Gonzales said, “There is a season for everything and God has a plan for us all,” adding that when Congress returns Monday, he will file his retirement from office. He also said it had been “a privilege … to serve the great people of Texas,” and he did not provide details about what would happen next.

Gonzales’ retirement announcement came hours after Democratic Rep. Eric Swalwell said he would resign from Congress as he confronted allegations of sexual misconduct. The timing intensified public and private pressure among lawmakers as they returned to Washington from a two-week break and discussed how to respond to the misconduct accusations.

Gonzales had already said he would not seek reelection after admitting to an affair with a staff member who later died by suicide. The affair and the staff member’s death were part of the backdrop for House Republicans’ calls for him to step down, as leaders sought to maintain control of a strongly Republican district in November’s midterm elections.

The House Ethics Committee began an investigation into Gonzales, which is tied to ethics rules that bar lawmakers from engaging in a sexual relationship with any employee of the House under their supervision. In a joint statement last month, the top Republican and Democratic members of the ethics panel said the investigative panel would look into whether Gonzales engaged in sexual misconduct toward an employee in his office and whether he discriminated unfairly by dispensing special favors or privileges.

Gonzales addressed the affair earlier, including during an appearance on the “Joe Pags Show,” when he was asked if he had a relationship with the aide, Regina Ann Santos-Aviles. In remarks on the show, Gonzales said, “I made a mistake and I had a lapse in judgment, and there was a lack of faith, and I take full responsibility for those actions,” and he said he had reconciled with his wife and asked God to forgive him. He also said he looked forward to the Ethics Committee investigation.

As members returned on Monday, lawmakers’ posts on social media reflected growing support for action against alleged misconduct. Rep. Teresa Leger Fernandez of New Mexico said both Gonzales and Swalwell “are not fit to serve in Congress given their sexual transgressions against women who work for them,” and she said she would introduce a resolution to expel Gonzales after already indicating there was a resolution she would support aimed at Swalwell.

Leger Fernandez, in a separate post after Gonzales made his retirement announcement, challenged him to make the decision “effective immediately.” She wrote that he had until 2 p.m. the next day, when she said she planned to file a resolution for expulsion.

Even as Gonzales said he would retire, the ethics investigation remained in place, with the House Ethics Committee’s panel tasked with examining the allegations involving his interactions with employees and related questions under House rules.