NFL player Chris McCain just dodged a bullet ... striking a plea deal that'll keep him outta jail after he was accused of spitting and grabbing a woman by the neck.
TMZ Sports has learned Chris McCain -- a 26 year old NFL free agent defensive end who at the time was on the Colts -- pled no contest to 2 misdemeanor counts of battery in an Los Angeles court.
We broke the story ... McCain was accused of spitting on a woman and forcefully grabbing her neck in L.A. on January 7.
In exchange for his plea, McCain was given a diversion program -- meaning if he keeps his nose clean for a year, he's in the clear.
He was also ordered to attend 12 anger management classes and complete 10 days of community service
McCain had been facing up to 6 months in jail.