Marty Klein, 51, president of the Agency for the Performing Arts and long known for nurturing the careers of prominent comedy performers, died of a sudden heart attack at 4:30 a.m. yesterday at his West Hollywood condo. He had appeared to be in good health beforehand.

At the time of his death, Klein personally represented such clients as Steve Martin, Martin Mull and singer Johnny Cash. His past clients had included David Letterman, John Candy, Rodney Dangerfield, the late Sam Kinison and Dan Rowan & Dick Martin. Klein joined APA in 1968 and had been its president since 1977. The Montreal native, who was raised in Colorado, was a disc jockey, a stand-up comic and road manager for comedian Shelley Berman before entering the agency biz in 1964.

Klein was celebrated for his ability to recognize and develop new comic talent from stand-up nitery gigs to film and TV stardom.

He and APA packaged the 1968-73 NBC show “Rowan & Martin’sLaugh-In,” which revolutionized TV comedy, and he continued developing the careers of other hip, influential comics.

“Everyone’s shocked and devastated,” Burton Taylor, APA’s senior VP and head of personal appearances, said yesterday.

Taylor called Klein “one of the really good guys in our business. Marty loved representing and being with talent but none more than his love of comedians.

“There will be no laughs today. Just tears.”

Klein was honored for his career achievement by the Assn. of Talent Agents in 1988.

He is survived by his second wife, Sharon; two daughters; and his mother.

Services are pending.