After two recent shootings on military bases, the Marines are changing their rules to allow off-duty law enforcement officers to carry their personal firearms.

Last month, a Saudi Arabian military student shot up a classroom at Naval Air Station Pensacola in Florida, killing three and injuring eight.

Just days earlier, a sailor at Pearl Harbor Naval Shipyard opened fire while on guard duty. He killed two Department of Defense workers and injured another.

More than 10 years ago, Nidal Hasan killed 13 and injuring several dozen more at Fort Hood in Texas.

TRENDING: Americans against unconstitutional mask mandates

All bases at the time banned military members from carrying weapons, except for certain limited circumstances.

But now, the Marine Corps Times reports the defense corps "has changed concealed carry rules to allow qualified active Marine law enforcement personnel to conceal carry on base while off-duty."

"The new rule allows active duty military police, criminal investigators, and Marine Corps law enforcement program police officers to conceal carry personally owned weapons while on base while off-duty as long as they comply to the 2016 Department of Defense Directive, title 'Arming and the Use of Force, the MARADMIN says," the report said.

The change allows the Marines with valid credentials to "carry concealed privately owned firearms ... aboard Marine Corps property in the United States and U.S. territories for personal protection not in the performance of official duties."

The authorization addresses only bases that are run by the Marine Corps. And the personal weapons must meet all local, state and federal laws for caliber, ammunition and more.

Federal restrictions on concealed carry, such as a ban on weapons in schools and courtrooms, still are in force, the report said.