Nirvana is not 'caused'. This is why the Buddha referred to the "path" to Nirvana rather than the "cause" of Nirvana.
Imagine being blind-folded. The eyes cannot see any sights. But if the blind-fold is removed, sights can be seen.
Similarly, greed, hatred & delusion are like a blind-fold that prevent experiencing Nibbana. Nibbana is not something 'mental' although the mind experiences Nibbana (as a sense object).
This is similar to how a tree or flower is not the eye, but the eye experiences the tree or flower.
It is just as if a man, traveling along a wilderness track, were to see an ancient path, an ancient road, traveled by people of former
times. He would follow it. Following it, he would see an ancient city,
an ancient capital inhabited by people of former times, complete with
parks, groves, & ponds, walled, delightful