Final answer:
The purpose of invading Mecca was to get revenge on the tribes who chased Prophet Muhammad away.
Step-by-step explanation:
The purpose of invading the city of Mecca was B. to get revenge on the tribes who chased him away. It was not to secure Islam as the main religion of Mecca or to steal the Kaaba.
After being forced to flee Mecca due to persecution, Prophet Muhammad returned with a large number of followers to reclaim the city. The invasion was a way to redress the wrongs that were inflicted upon him and his followers, and to establish justice.
The conquest of Mecca in 630 CE was a turning point for the spread of Islam, as it led to the widespread acceptance of the religion in the Arabian Peninsula.
Learn more about The purpose of invading the city of Mecca