Gene Anthony Ray, who starred as Leroy, a street-smart urban teenager, in the 1980 movie Fame and the later TV series, died on Friday in Manhattan. He was 41.

The cause was complications of a stroke he had in June, and he was also HIV positive, said Jean E. Ray, his mother.

Mr. Ray was a natural fit when he was cast as Leroy in the film, which won Academy Awards for best song and original score. Like his character in the film, Mr. Ray had never had professional dance training but had a raw talent that dazzled choreographers.

The actors who performed in the movie and in the TV series Fame portrayed students at New York’s High School of the Performing Arts, which Mr. Ray attended for a year before being kicked out. “It was too disciplined for this wild child of mine,” Mrs. Ray said.

His journey into the spotlight began at Julia Richmond High School. He performed in a dance class there and later auditioned for Louis Falco, the choreographer for the film Fame. He skipped school the day of the first tryout, and “Leroy Johnson was born,” Mrs. Ray said.

Mr. Ray also played Leroy in the NBC TV series Fame, which made its debut in 1982. It was canceled by NBC because of poor ratings but was later picked up by MGM Television, which distributed it in syndication from 1983 to 1987.

Born on May 24, 1962, in Harlem, Mr. Ray lived on West 153rd Street. After he gained stardom for his roles in Fame, Mr. Ray left school to pursue his career.

In 1982 he toured Britain to perform with other Fame cast members in 10 concerts. The Kids From Fame, a TV special about the tour, was broadcast in the United States a year later. His other film credits include Out of Sync, which was directed by his Fame co-star Debbie Allen, and Eddie, which starred Whoopi Goldberg.