Why did countries attack Portuguese ships and trading posts when the built a global empire?

The attacks on Portuguese ships and trading posts can be attributed to various reasons:

1. Economic competition: As Portugal built its global empire, its trading activities and lucrative businesses became targets for other countries seeking economic dominance. Rival nations recognized the immense wealth that Portugal was accumulating through its vast trading networks, which led to economic competition and attempts to plunder Portuguese ships and outposts.

2. Geopolitical rivalries: As Portugal expanded its presence around the world, it encroached upon territories claimed or desired by other powers. This provoked geopolitical rivalries and conflicts, prompting attacks on Portuguese ships and trading posts as a means of asserting control or countering Portuguese influence.

3. Nationalistic and religious conflicts: During the period of Portuguese exploration and empire-building, there were ongoing rivalries and tensions among different nations and religious groups. These conflicts often translated into attacks on Portuguese ships and trading posts, driven by nationalistic sentiments or religious animosity.

4. Piracy: The immense wealth carried by Portuguese ships made them attractive targets for pirates seeking quick riches. Pirates saw the opportunity to plunder these vessels, leading to regular attacks on Portuguese ships and trading posts along trade routes.

5. Acts of retaliation: Portuguese explorers and traders were not always perceived as peaceful entities but rather as conquerors, forcefully occupying territories and displacing local populations. This often generated resentment and provoked acts of retaliation from indigenous peoples or rival powers, resulting in attacks on Portuguese ships and trading posts.

It is important to note that while Portugal did face attacks on its ships and trading posts, it was also successful in defending and securing its vast empire for a considerable period, benefiting immensely from its trade networks and colonial holdings.