Discuss as:

'Wasn't the best thing I had ever done': Ex-traffic cop in porn flick fights for job

A California traffic cop who was fired after appearing in a porn film while on duty and in uniform is trying to get his job back. KNBC-TV's Joel Grover reports.

A former Los Angeles traffic officer said he was “totally unaware” when he was asked to appear in a porn movie while on duty and in uniform last year and now wants his job back.

“I was caught totally unaware, by surprise,” John Dancler said during his appeal to the Los Angeles Civil Service Commission on Wednesday.

Dancler was fired in July 2011 in the wake of an NBC4 investigation, which showed him and another traffic officer in a porn movie while on duty and in uniform, NBCLosAngeles.com reported.

View NBCLosAngeles.com's video of commission proceedings

“I could not believe what was going on, it was really surreal,” Dancler said during the hearing.

The NBC4 porn investigation went viral around the world last spring. The NBC4 team also uncovered a longstanding pattern of traffic officers who were convicted of crimes on the job, including soliciting prostitutes and shoplifting, but none had ever been disciplined, as recommended by city policy.

Read original investigation by NBCLosAngeles.com

Dancler said he was responding to a call for backup help in 2008 when a porn actress and her crew approached him, asking him to engage in lewd acts with the blonde woman.

Dancler admitted under questioning he had made a mistake.

"It wasn’t the best thing that I had ever done," Dancler said.

When asked if he informed others about the exchange on the streets, Dancler said “No.”

More content from msnbc.com and NBC News