WASHINGTON — Defense Secretary Ash Carter has given his top commanders the green light to allow more troops to carry weapons at U.S. bases, with a focus on recruiting stations, Reserve centers and other softer military targets.

Carter’s actions came two weeks after a Kuwaiti-born gunman fatally shot four Marines and a sailor before police killed him at the Navy reserve center in Chattanooga, Tennessee.

“The tragic shooting on July 16 in Chattanooga, Tennessee, illustrates the continuing threat to DOD personnel in the U.S. homeland posed by homegrown violent extremists,” Carter wrote in a memo released Thursday by the Pentagon.

In the memo, Carter gave his service chiefs and regional command heads until Aug. 21 to submit “action plans” for beefed-up security of personnel, buildings and other physical facilities.

“I am directing all components to consider any additional protection measures including changes to policy and procedures that protect our force against the evolving threat,” Carter wrote in the memo.

Armed citizen vigilante groups in a half-dozen states started standing guard outside recruiting centers and other public military sites after the July 17 shooting rampage.

In that assault, the shooter, later identified as Muhammad Youssef Abdulazeez, fired shots from his car at an armed forces recruiting center, and then drove 6 miles with police in pursuit, crashed through the Navy Reserve center’s security gate, left the car and ran through a building, firing as he moved.

The government has not classified the rampage as a terrorist attack but says Abdulazeez, 24, may have been a “lone wolf” assailant inspired by the Islamic State or other militant groups. Born in Kuwait before moving with his family to Tennessee, he’d made several visits to Jordan in recent years, ostensibly to see relatives.

The shooting was the deadliest criminal attack at a domestic military base since an Army psychiatrist shot and killed 13 soldiers and wounded 29 others in November 2009 at Fort Hood, Texas.

The psychiatrist, Nidal Malik Hasan, was later sentenced to death and is awaiting execution pending appeals at the Fort Leavenworth, Kansas, military prison. At his August 2013 court-martial, Hasan, an American-born Muslim, said the shootings were an act of jihad against the United States.

In the days following the Chattanooga shooting, lawmakers from both parties pushed bills that would arm domestic service members.

But former senior military officers who are sharpshooters and have served in high government posts urged caution, saying many U.S. troops have only basic skills with weapons, especially those with no experience in combat or war zones.

The Pentagon came out against the idea of giving every domestic member of the military a gun.

In his memo this week, however, Carter noted that existing Pentagon policy gives commanders at U.S. installations “the option of (employing) additional armed personnel.”