Conservative MSP Bill Aitken has resigned as convener of Holyrood's justice committee over comments he was said to have made about a gang rape.
Mr Aitken said the decision was made with "frustration" after calls for him to go.
The call by the Green Party came after a newspaper reported comments apparently made by Mr Aitken that the victim of a rape in Glasgow may have been a prostitute.
The MSP said he was "misrepresented".
The 38-year-old victim was attacked by three men in Glasgow's Renfrew Lane, next to the Pavilion Theatre, in the early hours of Friday 11 February.
The Sunday Herald reported that Mr Aitken - a Glasgow MSP who is retiring from elected politics at the next election - apparently told one of its journalists that Renfrew Lane was "an area where a lot of the hookers take their clients", although he added: "Now, that may not have happened in this case."
The Greens said the reported remarks were "unacceptable" and lodged a parliamentary motion calling for him to go.
'Open to misrepresentation'
Announcing his resignation, Mr Aitken said: "In politics, you have to have a thick skin. But this issue is no longer about me. For far too many people, perception is reality.
"Today, I am standing down as convener of the justice committee.
"I do so with a mixture of emotions. Frustration at allowing myself to be misrepresented. Anger at being misrepresented. And remorse to rape victims and their loved ones for any hurt they feel."
Mr Aitken said he had "left himself open to misrepresentation" by asking a journalist about the circumstances of the case.
"That is my fault and that is why I immediately issued a full and unreserved apology for any misunderstanding or distress it caused," he said.
"Unfortunately, the newspaper chose not to publish my full statement.
"It also decided not to publish any quotes from my second telephone call from the journalist during which I made my position clear.
"So, for the record, let me repeat again: Rape, in every case and for every victim is an abhorrent, vile violation.
"Every case and every victim must be treated equally."
Mr Aitken said he hoped his "true views can now be heard".
"In all my years as a city councillor, a JP and an MSP I have spoken out against criminals and spoken up for victims of crime," he added.
"That will not change in retirement. I will continue to battle for justice for all."
Green MSP Patrick Harvie, who lodged the parliamentary motion, said: "This kind of attitude is unacceptable wherever it comes from, and is fortunately dying out, but it has been particularly shocking to hear it from the convener of the justice committee.
"Parliament needs to be a place where all crimes are taken seriously, not somewhere where rape victims feel the system is against them."
Labour's equalities spokeswoman, Johann Lamont, also welcomed the move.
"Bill Aitken's resignation is a public acknowledgement that his comments were unacceptable and he has done the right thing," she said.
"This was a horrific crime and he should never have suggested that the victim was in some way to blame for what happened."
Robert Brown, the Liberal Democrats justice spokesman, said Mr Aitken had been an excellent convener.
"It's highly unfortunate that Bill Aitken's distinguished political career should end in this way as a result of badly chosen and ill-advised comments," he said.
"However it is important that no rape victim feels in any way that their rights would not be fully and totally upheld and defended by the parliament and parliamentarians."
NUS Scotland said a demonstration outside the Scottish Parliament during Tuesday's Justice Committee meeting had been called off.
Police are continuing to investigate the rape.