DUP assembly member Paul Berry has resigned from the party, the High Court in Belfast has been told.
Mr Berry has resigned from the DUP
Mr Berry has also dropped legal action against the DUP over its decision to suspend him from the party.
A DUP spokesman said the legal action should never have been brought but the result had vindicated its stance.
The Newry and Armagh MLA was suspended after a Sunday newspaper reported an alleged encounter with a masseur in a Belfast hotel.
Mr Berry does not deny meeting a man in the hotel, but strongly contests the nature of the encounter.
He said it was for the purposes of a sports massage.
Mr Berry went to court to challenge the DUP's disciplinary moves.
In a statement issued on Friday through his solicitors, Mr Berry said: "Today I wish to publicly announce my resignation from the Democratic Unionist Party.
"The past number of months has been a particularly stressful time for my wife, family and myself and we want closure on this matter.
"We have come to the conclusion that there is no future for me within the DUP and on that basis we have decided that it is best for me to resign."
He said it was with "great reluctance" that he had brought injunction proceedings against the DUP given his "longstanding associations" with the party.
"I wanted to ensure that their disciplinary process was fair, lawful and came to a just outcome in keeping with the principles of natural justice. It is unfortunate that this issue remains unresolved," he said.
He said, however, he had instructed his legal team to withdraw the injunction against the party.
Mr Berry said he would remain an assembly member and a councillor.
He is to pay £3,000 to the DUP to help meet its defence costs.
In a statement, a DUP spokesman said: "This is a legal action which should never have been brought against the party.
"But we have been vindicated by the manner in which the matter has been resolved, with judgement for the party and a contribution towards the party's legal costs."