Two men were robbed of more than $40,000 in casino winnings and one was shot after masked assailants followed them to Virginia from MGM National Harbor in December, according to new details in a search warrant.

Prince William County police had previously disclosed the Dec. 19 incident but not the amount stolen or a detailed account of how the robbery unfolded. The victims won $39,000 and $3,000, respectively, while playing blackjack at the casino in Oxon Hill, Md., according to the search warrant filed in Fairfax County Circuit Court.

Surveillance video in the casino captured men following the victims through the casino and to a parking garage after they cashed out their winnings, detectives wrote in the search warrant. The men were communicating on cellphones.

On the way home, the victims stopped at a Woodbridge Shell gas station, where cameras recorded a gray SUV leaving shortly after the victims departed in their vehicle, according to the search warrant.

About 1:40 a.m., one of the victims was dropping the other off at his home in the 4700 block of Pearson Drive in Woodbridge when the driver was forced from the vehicle by two men with handguns, according to the search warrant.

The driver was hit in the head about 20 times and shot in the left arm before the masked men took $39,000 from him, according to the search warrant.

A third masked man put a gun to the other victim’s back and forced him to lie on the ground before taking $3,000 from him, according to the search warrant. The robbers then fled in a gray SUV similar to the one seen on the gas station surveillance video. The robbery was captured by a Ring surveillance camera, according to the search warrant.

The victim who was shot is recovering, police said.

Prince William police have identified suspects in the case, but The Washington Post is not naming them because they have not been charged.

The investigation revealed that the suspects are believed to have been involved in a similar robbery of casino patrons in Fairfax County on Oct. 1, according to the search warrant. Police filed the search warrant to obtain a DNA sample from one of the suspects.