Eyewitness News examined the dangers of mental illness on Los Angeles streets and how law enforcement is evolving to deal with it.

Security video from two weeks ago showed a large, strong man who suffers from bipolar disorder show up outside of the Lakewood sheriff's substation with what appeared to be a violent intent.

"He had an improvised weapon that he had tied a rope around his waist and at the end of the rope was a large brick," L.A. County sheriff's Lt. Eric Castano said.

Castano was there, and with three decades of experience and constant training, he knew the man wasn't a criminal, but someone in distress.

"This was a mental health situation and although he had the brick, the goal was to try to help him," he said.

He added that the deputies were setting up a way to deal with the man in a way they were trained to do. They created distance and one deputy did all the talking, Castano said.

But the situation is far more complicated and dangerous. The young man had doused himself with gasoline and he had a lighter in his left hand. While it can't be seen in the video, he was sparking the lighter on his thigh.

"So when that happened, of course, it became a critical incident, an immediate critical incident," Castano said.

Dealing with the mentally ill has become a critical yet controversial part of law enforcement. Mental health experts said it shouldn't be this way.

"They need treatment in life to get back on track and be productive members of society as opposed to being put into constraining, punitive environments," said Dr. Jonathan Sherin, with the L.A. County Department of Mental Health.

But resources to help the mentally ill are severely underfunded. As a result, there are not enough clinics and beds. So eventually they end up on our streets and then filling jails when all they need is a doctor.

Over the last five years, the population of mentally ill in the L.A. County Jail has increased by 49 percent.

"That's a dramatic increase in a very difficult population, in a population that I would argue should not be treated in a jail facility," L.A. County Sheriff Jim McDonnell said.

He added that jails were never supposed to be used this way.

"So by default we have become the largest mental institution in America," McDonnell said.

But until things change, it is deputies who will be on the front lines dealing with the mentally ill. The deputies train, role play and learn to assess and think quickly. So when they're faced with a dangerous situation, such as the man doused in gasoline, they can act humanely and with compassion.

The young man was not hurt or arrested when the tense situation came to an end, but he was taken to a hospital where he is getting help.

Most law enforcement experts said policing criminals is hard enough, but adding mental illness to their responsibilities can make the job exponentially more difficult.

Without the proper funding for medical help as well as drug addiction escalating, it's a problem that is going to get worse no matter how hard officers train to deal with it.