ยง660-4ย  For prisoners, for trial or
testimony.ย  Nothing in this chapter shall be construed to restrain the
power of any court of record to issue a writ of habeas corpus ad respondendum,
when necessary, to bring before it any prisoner for trial in any criminal
cause, lawfully pending in the court, or a writ of habeas corpus ad
testificandum, to bring in any prisoner to be examined as a witness in any
action or proceeding, civil or criminal, pending in the court, when it thinks
the personal attendance and examination of the witness is necessary for the
attainment of justice.ย  The writ may be issued for such purposes by any court
of record in the exercise of a sound discretion, and with due regard to
conflicting interests and liabilities, anything in this chapter to the contrary
notwithstanding. [L 1870, c 32, ยง31; RL 1925, ยง2728; RL 1935, ยง4313; RL 1945,
ยง10354; RL 1955, ยง239-4; HRS ยง660-4; am L 1972, c 90, ยง5(b)]