Kenyan Health Minister Charity Ngilu has been freed from police custody after the Nairobi High Court ruled that her arrest was illegal.
Charity Ngilu is well-known for contradicting government policy
She had been engaged in a stand-off for several hours after the police refused to let her car leave the Criminal Investigations Department headquarters.
She was summoned to report there after being arrested on Thursday for helping a protester escape police custody.
Ms Ngilu's supporters say she is being intimidated for political reasons.
"We made a constitutional application in court and it has ruled that Ms Ngilu's arrest and detention was illegal, so we have just left the CID headquarters," her lawyer Paul Muite told the BBC News website.
Mr Muite however said they are yet to decide what steps the minister would take after the release.
Ms Ngilu was first arrested on Thursday and spent several hours in detention, before being freed on bail and told to report to CID headquarters on Friday.
She turned up but refused to leave her car, demanding to be released or charged in court.
But police commissioner Major General Hussein Ali said she had committed a crime by storming into a police station and freeing a women's rights activist.
"The law is not going to be compromised in this country. It does not matter your station in life," police spokesman Eric Kiraithe had told AP.
Mr Muite had labelled the arrest "nonsensical", saying Ms Ngilu helped the female protester to hospital after she had been beaten by police.
The protester, Anne Njogu and four others, were arrested after objecting to plans by MPs to award themselves a $20m bonus before parliament is dissolved.
Ms Njogu was taken to hospital by Ms Ngilu on Tuesday, but rearrested on Wednesday.
A day later a judge ordered all five to be released, saying their detention had been illegal. The five now plan to sue the police for wrongful arrest.
The protesters say MPs do not deserve such a huge pay-off
This is the first time a minister has been arrested since President Mwai Kibaki came to power in 2003.
Ms Ngilu is the registered leader of the Narc coalition and refuses to stand down in favour of Mr Kibaki ahead of December's elections.
MPs are to vote on a government proposal to give them a bonus equivalent to 12.5% increase in their pay and allowances backdated to January 2003.
Correspondent say Kenya's MPs are seen as lazy and self-interested.
There are often not enough in parliament to pass legislation - unless it concerns a pay rise for themselves.
They already earn more than $10,000 a month in salaries and expenses, much of which is tax-free, in a country where most live on less than $1 a day.
President Kibaki is due to seek re-election in December but it is not clear which party he will represent.
He was elected in 2003 at the head of a wide coalition, which has since fractured.