After the September 11th attacks Iran helped organise the support of the Northern Alliance against the Taliban. Khatami, who was president at the time, even went as far as saying that it was for the Palestinians and Israel to come to an agreement about the future of Palestine. It looked for a moment that things might move in a de-scalation direction, and then Bush II came out with the Axis of evil shït and any progress was scuppered. The hardliners said what's the point making the effort if we can't trust the other side to keep its side of the bargain.
Then Rouhani manages the nuclear agreement with Obama and Trump fücks it up again. Rinse and repeat, and we are where we are.