Lonyai was arrested after a scuffle with guards at the Supreme Court.
Lonyai had accompanied Wetangula and NASA leader Raila Odinga to the supreme court but was denied entry into the premises because he was armed.
Lonyai was then ejected and his gun withdrawn from him.
In a notice dated August 25, the judiciary had issued an order that only police officers deployed in the court premises were to be armed.
"Kindly note that apart from police officers who are deployed at the courts, no other persons shall be allowed to access our premises with firearms," read the notice.