If any judge, after a proper application is made, shall refuse to grant an order for a writ of habeas corpus, or if the officer or person to whom such writ may be directed shall refuse obedience to the command thereof, the judge, officer or person shall forfeit and pay to the person aggrieved a sum not exceeding $5,000, to be recovered by action in any court of competent jurisdiction.
NRS 34.670