Any officer or other person who has the custody of a party produced on habeas corpus and who detains him after an order of the court or judge for his discharge or enlargement or afterwards arrests him without a legal and proper cause, warrant or other process shall be fined, on conviction thereof, not less than $50.00 nor more than $500.00, and is also responsible in a civil action for any damages the party may have sustained.
Ala. Code § 15-21-27 (1975)