Maryland Transportation Section 22-223
(a)   Whenever a motor vehicle is being driven on a roadway or adjacent shoulder during the times specified in § 22-201.1 of this subtitle, the driver shall use a distribution of light, or composite beam, directed high enough and of sufficient intensity to reveal persons and vehicles at a safe distance in advance of the vehicle, subject to the requirements and limitations of this section.
(b)   Whenever a driver of a vehicle approaches an oncoming vehicle within 500 feet, the driver shall use a distribution of light, or composite beam, so aimed that the glaring rays are not projected into the eyes of the oncoming driver. However, the lowermost distribution of light, or composite beam, specified in § 22-222(a)(2) of this subtitle, shall be deemed to avoid glare at all times, regardless of road contour and loading.
(c)   Whenever the driver of a vehicle approaches another vehicle from the rear, within 300 feet, the driver shall use a distribution of light permissible under this title, other than the uppermost distribution of light specified in § 22-222(a)(1) of this subtitle.