Escape or attempt to escape from custody, whether within or without this state, while in the temporary custody of an authority of another state acting pursuant to the agreement on detainers shall constitute an offense against the laws of this state to the same extent and degree as an escape from the institution in which the prisoner was confined immediately prior to having been released to temporary custody and shall be punishable in the same manner as an escape or attempt to escape from said institution.