WASHINGTON (Reuters) - The White House on Tuesday accused Tehran of trying to take advantage of Gaza-related protests in the U.S. and described such behavior as unacceptable, following a warning by the top U.S. intelligence official that Iran was trying to stoke discord in American society.

The warning, issued earlier on Tuesday by Director of National Intelligence Avril Haines, said actors tied to Iran's government had posed as activists online, sought to encourage protests regarding Gaza and even provided demonstrators with financial support.

In a press briefing, White House spokesperson Karine Jean-Pierre told reporters: "Americans across the political spectrum, acting in good faith, have sought to express their own independent views on the conflict in Gaza. The freedom to express diverse views when done peacefully is essential to our democracy."

She added: "At the same time, the U.S. government has a duty to warn Americans about foreign malign influences ... We will continue to expose attempts to undermine our democracy in our society just as we are today."

There was no immediate comment from Tehran.

(Reporting by Steve Holland and Tyler Clifford; editing by Rami Ayyub)