Prime Minister Lee Hsien Loong said he accepted with "great sadness" the resignation of Speaker of Parliament Michael Palmer on Wednesday.
In his letter to Lee, who is also secretary-general of the ruling People's Action Party, Palmer, who is married, said he was resigning from the party to take full responsibility for a "grave mistake".
The MP for Punggol East said he had a relationship with a member of the People's Association staff working in the Paris Ris-Punggol GRC, for which he had been MP from 2006 to 2011.
Aside from posting Palmer's resignation letter on his Facebook page, Lee also posted his reply in which he noted that the erstwhile speaker had worked hard as MP.
However, the prime minister said, all PAP MPs and grassroots advisors must "uphold the highest standards of personal conduct, especially when dealing with constituents, activists, and staff".
"I am glad that you realise that what you did was wrong, and have been forthright in acknowledging the mistake you made," he said.
He added that he hoped Singaporeans would give Palmer and his family peace and privacy to rebuild their lives.
Palmer's resignation over an extra-marital relationship comes after a series of high profile sex scandals involving top civil servants and another MP.
See a copy of Palmer's resignation letter below:
Speaker Michael Palmer quits over improper relationship
Ng Boon Gay's sex-for-contracts trial adjourned
Palmer nominated for Speaker of Parliament role
Yaw Shin Leong quits WP over affair
Women linked to former SCDF chief Peter Lim