April 10 (Reuters) - An aspiring TV producer who was being held captive by a knife-wielding man in West Hollywood was mistakenly shot and killed by Los Angeles County sheriff's deputies as he tried to escape his assailant, the sheriff's department said on Thursday.

John Winkler, 30, was one of three men being held and attacked by a 27-year-old man with a knife at an apartment on Monday night, the Los Angeles Sheriff's Department said in a statement.

He and another man ran out of the apartment to get away, but sheriff's deputies called to the scene thought he was the assailant and shot him, the department said.

"The apartment door suddenly opened and a male victim came rushing out," the department said. "He was covered in blood and bleeding profusely from the neck. Simultaneously, victim Winkler ran out of the door, lunging at the back of the fleeing victim."

Both men ran directly at the deputies, the statement said.

"Believing Winkler was the assailant and the assault was ongoing and he would attack the entry team, three deputies fired their duty weapons at him."

The deputies then heard sounds of a fight from the apartment and went inside to find the attacker, identified as Alexander McDonald, assaulting another person.

McDonald, the roommate of one of the victims, was arrested and charged with murder, attempted murder and torture. Winkler was taken to a hospital, where he later died, the sheriff's department said.

The Los Angeles Times, citing a friend of Winkler's, said he moved to West Hollywood from Washington state last year in hopes of breaking into the entertainment business as a producer.

He had landed a three-day job filling in as a production assistant on the Comedy Central show "Tosh.0," a spokeswoman for the network told Reuters. (Reporting by Sharon Bernstein; Editing by Cynthia Johnston and Mohammad Zargham)