Bernie Casey, the beloved and iconic co-star in "Revenge of the Nerds" and "I'm Gonna Git You Sucka," died in an L.A. hospital ... TMZ has learned.

Bernie's rep tells us he died peacefully Wednesday, surrounded by loved ones. We're told he suddenly fell ill recently, and had spent the last few days hospitalized.

He broke into Hollywood with roles in blaxploitation films, and went on to co-star in nearly 80 different projects -- most notably he was the national head of the Tri Lams in 'Nerds' ... and neighborhood activist John Slade in 'Sucka.' He was also in "Bill and Ted's Excellent Adventure."

Casey was totally a jack-of-several-trades, having also played in the NFL as a Pro Bowl wide receiver for the L.A. Rams in the late '60s. He also had a passion for painting and poetry.

Bernie was 78.