The only outlet from the room was the door, consequently he would perforce have to wait until the two men returned to fetch him.
He could not leave until two men returned to get him.
He could leave whenever he wished to.