Why did khomeini return to Iran?

He was the leader of Islamic revolution and Shah sent him out of Iran to stop the revolution. but this action made people angry and people by their protests made the Shah to escape from Iran and then people asked Imam Khomeini to return and so he returned.