Why was Ayatollah Khomeini exiled?

He got exiled for 14 years and decided to come back in 1979. He was exiled because he advocated for the overthrow of the Shah of Iran.