A court in Co Antrim has heard how a group originally arrested in connection with the gang rape of a woman and an assault of a man were actually not involved in the 12-hour attack.
Police believe the five Lithuanian men were actually intent on carrying out revenge for the rape and assault.
The men were arrested in Portadown after a six-inch knife and two metal poles were found in their car.
The driver of the car told police they had planned to get those who assaulted their friend.
This was a reference to the rape of the woman and attack on a man in a flat in Lurgan last Wednesday.
Both victims sustained serious injuries in the assault, which police believe was carried out by a gang of men.
A PSNI detective opposed bail for the five Lithuanian men because police feared that if released the men would commit further offences and interfere with the investigation into a rape and physical assault.
Police said two of the defendants initially provided information about the rape and assault but were arrested later.
A lawyer for the five said the men had clear criminal records and were in fact intent on assisting the police investigation.
He argued that if they had intended to take justice into their own hands it was unlikely they would have gone to a police station beforehand.
All five were granted bail.