§ 16–1908. Right of other persons to writ.
A person entitled to the custody of another person, unlawfully confined or detained by a third person, as a parent, guardian, committee, spouse, or domestic partner, entitled to the custody of a minor child, ward, spouse, or domestic partner, upon application to the court or a judge as provided by this chapter, and showing just cause therefor, under oath, is entitled to a writ of habeas corpus, directed to the person confining or detaining, requiring him forthwith to appear and produce before the court or judge the person so detained, and the same proceedings shall be had in relation thereto as provided for by this chapter. The court or judge, upon hearing the proofs, shall determine which of the contesting parties is entitled to the custody of the person so detained, and commit the custody of the person to the party legally entitled thereto. For the purposes of this section, the term “domestic partner” shall have the same meaning as provided in § 32-701(3).