Md. CRIMINAL LAW Code Ann. § 4-203 said:
§ 4-203. Wearing, carrying, or transporting handgun
(a) Prohibited. --
(1) Except as provided in subsection (b) of this section, a person may not:
(i) wear, carry, or transport a handgun, whether concealed or open, on or about the person;
(ii) wear, carry, or knowingly transport a handgun, whether concealed or open, in a vehicle traveling on a road or parking lot generally used by the public, highway, waterway, or airway of the State;
(iii) violate item (i) or (ii) of this paragraph while on public school property in the State; or
(iv) violate item (i) or (ii) of this paragraph with the deliberate purpose of injuring or killing another person.
(2) There is a rebuttable presumption that a person who transports a handgun under paragraph (1)(ii) of this subsection transports the handgun knowingly.
(b) Exceptions. -- This section does not prohibit:
(1) the wearing, carrying, or transporting of a handgun by a person who is authorized at the time and under the circumstances to wear, carry, or transport the handgun as part of the person's official equipment, and is:
(i) a law enforcement official of the United States, the State, or a county or city of the State;
(ii) a member of the armed forces of the United States or of the National Guard on duty or traveling to or from duty;
(iii) a law enforcement official of another state or subdivision of another state temporarily in this State on official business;
(iv) a correctional officer or warden of a correctional facility in the State;
(v) a sheriff or full-time assistant or deputy sheriff of the State; or
(vi) a temporary or part-time sheriff's deputy;
(2) the wearing, carrying, or transporting of a handgun, in compliance with any limitations imposed under § 5-307 of the Public Safety Article, by a person to whom a permit to wear, carry, or transport the handgun has been issued under Title 5, Subtitle 3 of the Public Safety Article;
(3) the carrying of a handgun on the person or in a vehicle while the person is transporting the handgun to or from the place of legal purchase or sale, or to or from a bona fide repair shop, or between bona fide residences of the person, or between the bona fide residence and place of business of the person, if the business is operated and owned substantially by the person if each handgun is unloaded and carried in an enclosed case or an enclosed holster;
(4) the wearing, carrying, or transporting by a person of a handgun used in connection with an organized military activity, a target shoot, formal or informal target practice, sport shooting event, hunting, a Department of Natural Resources-sponsored firearms and hunter safety class, trapping, or a dog obedience training class or show, while the person is engaged in, on the way to, or returning from that activity if each handgun is unloaded and carried in an enclosed case or an enclosed holster;
(5) the moving by a bona fide gun collector of part or all of the collector's gun collection from place to place for public or private exhibition if each handgun is unloaded and carried in an enclosed case or an enclosed holster;
(6) the wearing, carrying, or transporting of a handgun by a person on real estate that the person owns or leases or where the person resides or within the confines of a business establishment that the person owns or leases;
(7) the wearing, carrying, or transporting of a handgun by a supervisory employee:
(i) in the course of employment;
(ii) within the confines of the business establishment in which the supervisory employee is employed; and
(iii) when so authorized by the owner or manager of the business establishment;
(8) the carrying or transporting of a signal pistol or other visual distress signal approved by the United States Coast Guard in a vessel on the waterways of the State or, if the signal pistol or other visual distress signal is unloaded and carried in an enclosed case, in a vehicle; or
(9) the wearing, carrying, or transporting of a handgun by a person who is carrying a court order requiring the surrender of the handgun, if:
(i) the handgun is unloaded;
(ii) the person has notified the law enforcement unit, barracks, or station that the handgun is being transported in accordance with the court order; and
(iii) the person transports the handgun directly to the law enforcement unit, barracks, or station.
(c) Penalty. --
(1) A person who violates this section is guilty of a misdemeanor and on conviction is subject to the penalties provided in this subsection.
(2) If the person has not previously been convicted under this section, § 4-204 of this subtitle, or § 4-101 or § 4-102 of this title:
(i) except as provided in item (ii) of this paragraph, the person is subject to imprisonment for not less than 30 days and not exceeding 3 years or a fine of not less than $ 250 and not exceeding $ 2,500 or both; or
(ii) if the person violates subsection (a)(1)(iii) of this section, the person shall be sentenced to imprisonment for not less than 90 days.
(3) (i) If the person has previously been convicted once under this section, § 4-204 of this subtitle, or § 4-101 or § 4-102 of this title:
1. except as provided in item 2 of this subparagraph, the person is subject to imprisonment for not less than 1 year and not exceeding 10 years; or
2. if the person violates subsection (a)(1)(iii) of this section, the person is subject to imprisonment for not less than 3 years and not exceeding 10 years.
(ii) The court may not impose less than the applicable minimum sentence provided under subparagraph (i) of this paragraph.
(4) (i) If the person has previously been convicted more than once under this section, § 4-204 of this subtitle, or § 4-101 or § 4-102 of this title, or of any combination of these crimes:
1. except as provided in item 2 of this subparagraph, the person is subject to imprisonment for not less than 3 years and not exceeding 10 years; or
2. A. if the person violates subsection (a)(1)(iii) of this section, the person is subject to imprisonment for not less than 5 years and not exceeding 10 years; or
B. if the person violates subsection (a)(1)(iv) of this section, the person is subject to imprisonment for not less than 5 years and not exceeding 10 years.
(ii) The court may not impose less than the applicable minimum sentence provided under subparagraph (i) of this paragraph.