Why did merchant guilds form in the Middle Ages?

Why did merchant guilds form in the Middle Ages?
a. To serve local churches
b. To build cathedrals
c. To eliminate competition between merchants
d. To protect merchants and their goods