This is a link to the full text of the MD statute. Below I have listed the 8 exceptions to the law that "[a] person may not purchase more than one regulated firearm in a 30-day period."
Article - Public Safety, §5–128.
(1)a law enforcement agency;
(2)an agency authorized to perform law enforcement duties;
(3)a State or local correctional facility;
(4)a private security company licensed to do business in the State;
(5)the purchase of an antique firearm;
(6)a purchase by a licensee;
(7)the exchange or replacement of a regulated firearm by a seller for a regulated firearm purchased from the seller by the same person seeking the exchange or replacement within 30 days immediately before the exchange or replacement; or
(8)a person whose regulated firearm is stolen or irretrievably lost and who considers it essential that the regulated firearm be replaced immediately, if;
(i)the person provides the licensee with a copy of the official police report or an official summary of the report, a copy of which shall be attached to the firearm application;
(ii)the official police report or official summary of the report contains the name and address of the regulated firearm owner, a description of the regulated firearm, the location of the loss or theft, the date of the loss or theft, and the date when the loss or theft was reported to the law enforcement agency; and
(iii)the loss or theft occurred within 30 days before the person’s attempt to replace the regulated firearm, as reflected by the date of loss or theft on the official police report or official summary of the report.