According to the text the growing demand for African slaves during the slave trade era motivated African leaders to

Migrate large populations of people inland away from coastal threats by the shores.
Initiate attacks of rival tribes in order to profit by selling captured Africans to the Europeans
Establish peaceful relationships with the Europeans out of fear.
pay the Europeans lots of money to avoid becoming colonized.

Initiate attacks of rival tribes in order to profit by selling captured Africans to the Europeans.

According to the text, the growing demand for African slaves during the slave trade era motivated African leaders to initiate attacks on rival tribes in order to profit by selling captured Africans to the Europeans.

To find the answer to this question, we need to carefully read the text and analyze the information provided.

The text suggests that the growing demand for African slaves during the slave trade era influenced African leaders to take certain actions. Let's evaluate each given option and see which one aligns with the information provided:

1. Migrate large populations of people inland away from coastal threats by the shores:
There is no information in the text about African leaders migrating people inland to protect them from coastal threats. Thus, this option can be eliminated.

2. Initiate attacks of rival tribes in order to profit by selling captured Africans to the Europeans:
The text mentions that African leaders would sell captured Africans to Europeans. Therefore, initiating attacks on rival tribes to capture more Africans aligns with the information provided.

3. Establish peaceful relationships with the Europeans out of fear:
The text does not mention anything about African leaders establishing peaceful relationships with Europeans out of fear. Therefore, we can eliminate this option.

4. Pay the Europeans lots of money to avoid becoming colonized:
There is no mention of African leaders paying Europeans money to avoid colonization in the text.

Therefore, based on the information provided in the text, the answer to the question is:
African leaders were motivated to initiate attacks on rival tribes in order to profit by selling captured Africans to the Europeans during the slave trade era.