HOGAN’S ALLEY, Va.—America’s worst neighborhood is a magnet for killers, thieves and drug smugglers. At lunch, crooks and cops call a truce to line up at Subway, the only place in town to get a sandwich.

The franchise is located at the Federal Bureau of Investigation academy in Quantico, Va., just off the main drag in Hogan’s Alley, a town built to train FBI agents and other law-enforcement officers.

The Subway is real, serving the foot-long Italian B.M.T., Chicken & Bacon Ranch Melts, sodas and other menu offerings; its employees are bona fide “Sandwich Artists.” All the rest—the bank, post office, drugstore, hotel—are bogus. The bad guys are just acting.

Hogan’s Alley is where fresh FBI recruits practice arrests and standoffs in different scenarios. Trainees from the Drug Enforcement Administration wage paint-gun firefights with counterfeit offenders. State and local law enforcement personnel also hit town to practice the latest crime-fighting techniques.

Putting a real restaurant in a fake town is more practical than it sounds. “If you’re in the middle of training, it’s a long way back to the main academy building,” where the dining hall is located, said Rich Kolko, a retired FBI agent who went through the academy in 1996.