The L.A. Public Library offers free internet at its 73 branches, but an NBC4 I-Team investigation finds many patrons use it to watch explicit porn, often with children nearby.

The I-Team observed widespread viewing of X-rated content, during a 3 month undercover investigation of rampant drug use and lewd behavior at L.A. city libraries.

But while drug use and lewd conduct are illegal, viewing porn at the library is legal and allowed, due to a 2011 Los Angeles City Council decision. Back then, council members decided that using taxpayer-funded public computers to view porn is a First Amendment right.

A security guard at Goldwyn Library in Hollywood told an I-Team producer that anyone can watch porn as long as their hands remain visible to guards.

"They can't be masturbating," said the guard.

On one afternoon, at Durant Public Library on Sunset Boulevard, a man watched X-rated material just a few feet from the children's area, where a librarian was hosting a reading circle. On a different day at Durant, another man looked at online porn as a child walked by, pointing at the computer screen.

"It is disgusting," said Los Angeles city councilmember David Ryu (4th District), when informed of the I-Team's findings. "It's wholly unacceptable. These are public libraries!"

"It's absolutely not okay," said City Librarian John Szabo, who oversees the downtown Central Library and 72 branches.

L.A. city libraries have installed "privacy screens," which are supposed to make it impossible for anyone but the computer user to see what's on the monitor. But I-Team producers stood as far as four feet to the side, behind patrons who were viewing porn, and were able to clearly see scenes of people engaged in sex acts.

Some libraries outside of Los Angeles, like the Manhattan Beach branch of the L.A. County system, use filtering software in an attempt to block pornographic material on public computers.

"The filtering software blocks the most sexually explicit internet sites," said Manhattan Library branch manager Melissa McCollum.

Not necessarily.

During a demonstration of the filtering software, a librarian typed "Playboy.com" into the search bar, and the screen said "access denied." However, when she typed the word "porn" into Google on that same computer, it brought up dozens of X-rated sites featuring graphic sexual videos.

"I do not think the taxpayers of Los Angeles meant for their money to be spent to allow for people to access lewd acts and pornography on public computers," said Councilmember Ryu.

Ryu says he will meet with fellow councilmembers next week to develop a new plan to prevent children from being exposed to pornographic material.