Nick Ramsay's suspension from the Conservative group in the Welsh assembly must be lifted pending legal action, a judge has ruled.
The Monmouth AM has been suspended since he was arrested but released without charge on New Year's Day.
Mr Ramsay is suing group leader Paul Davies for breaking the party's constitution in suspending him.
In Bristol, High Court judge Jonathan Russen ruled the suspension should be lifted until the case is heard.
Mr Ramsay said he was "grateful" to be able to serve his constituents again.
Representing Mr Ramsay in court, David Lock QC argued party rules had been broken because his client was not "referred to the group" for disciplinary action.
He said Mr Davies did not have the right to make the decision to suspend him alone without the support of the group.
There are 12 Tory AMs in the assembly group.
Mr Lock said there had been no disciplinary action or disciplinary charges formulated against Mr Ramsay in the Cardiff Bay group.
The court heard Mr Ramsay had been at his "wit's end and doesn't know how to break the stalemate".
Mr Lock added: "The matter is primarily urgent because the claimant has important responsibilities as an elected member of the Welsh assembly which are being thwarted by his unlawful suspension from the group.
"He tried to work within the Conservative party to resolve matters in a sensible way but, for the reasons explained in his witness statement, this proved to be impossible."
Richard Price QC, representing Mr Davies, argued for an adjournment on the basis that they had less than 24 hours to prepare for the case.
He added: "The defendant and other members of the group who were involved in this process are extremely concerned that there is a risk, if the application for an adjournment was to be refused, this matter would be decided on the back of the claimant alone, which is wholly unsatisfactory and wholly unfair."
The judge refused the application for an adjournment and allowed the interim injunction pending the case being heard.
He also ruled that if Mr Ramsay is successful he will be reimbursed for his costs.
Despite lifting the assembly group ban, the judge said he would not interfere in any party-wide disciplinary processes.
Speaking outside the court, Mr Ramsay said: "I am disappointed that I had to come to court today to achieve this result.
"However, I am grateful for the opportunity to continue serving my constituents and discharging my public functions."
Mr Ramsay also said he was "completely committed" to his colleagues and the wider Conservative party.
The Welsh Conservatives have declined to comment.