A legendary racetrack in NYC allegedly lost $280,000 in a brazen March armed robbery ... but law enforcement officials say they've now caught and arrested 2 suspects in the case.
The robbery, according to court docs obtained by TMZ Sports, went down at Aqueduct Racetrack on March 7 ... and officials say it all involved an elaborate scheme with an "inside man" at the track.
Officials in the docs say hours after the venue concluded its huge Gotham Day races ... two men held up three racetrack employees at gunpoint as they were transporting cash to a vault.
In the docs, officials claim the two men -- who were wearing surgical masks -- ordered the employees to hand over money and their phones ... and then demanded they lock themselves in a closet.
Officials say the two alleged criminals were caught on surveillance shortly after, leaving the track with "a garbage bag and duffel bag, both of which appeared to be full."
The twist? Law enforcement officials say in the docs, one of the employees in the alleged robbery was actually in on the crime.
The officials claim the employee -- a security guard -- provided the two alleged thieves with information on the best time and place to steal the cash, and even suggested a good hiding spot for them.
In the docs, officials say they were able to crack the case because the security guard and one of the alleged gunmen were longtime associates -- who, per the docs, had called each other on the days and hours leading up to the alleged crime.
The track employee and one of the alleged robbers were arrested and charged -- the U.S. Attorney for the Eastern District Of NY announced Monday.
The second alleged gunman has yet to be arrested.
Both dudes face up to 20 YEARS behind bars if convicted.