When it appears to the court at a hearing or trial that the attendance or testimony of any person or the production of any document or tangible thing not produced by any party is necessary for the purpose of justice, the court (a) may order any party to produce the document or tangible thing for inspection by the court or jury, or (b) may issue a subpoena for the production of the person, document, or tangible thing; and in either event the court may continue the hearing or trial to allow compliance with the order or subpoena, upon such conditions as to time, notice, cost, and security as the court deems proper.
Md. R. Civ. P. Cir. Ct. 2-514
This Rule is derived from former Rule 521.