HARTFORD, Conn. — A federal judge in Connecticut has ruled that thousands of Navy and Marine Corps veterans of Iraq and Afghanistan who developed post-traumatic stress disorder but were denied Veterans Affairs benefits can sue the military.

Senior U.S. District Judge Charles Haight Jr. on Thursday certified a class-action lawsuit against Navy Secretary Richard Spencer by veterans who say they were given less-than-honorable discharges for minor infractions linked to untreated mental health problems.

The discharge designation prevents them from getting VA health benefits.

Navy officials did not immediately return messages seeking comment Friday.

The lead plaintiff, Marine veteran Tyson Manker, of Jacksonville, Illinois, called Thursday's ruling a victory for tens of thousands of military veterans.

Yale Law School students are representing the veterans and have filed a similar lawsuit against the Army.