The Darien scheme was an attempt by Scotland to establish a colony in what would come to be known as panama, this area had been under Spanish rule for at least a century at this point. why did Scotland attempt to build a colony there, was this in union with Spain or if it had been successful would it have likely started a war between them?
I actually just read a bit about this (Read: My knowledge of this is minimal but I'm going to throw it out here anyway).
From what I understand, the Darien Scheme was conceived as an attempt at Scotland (or some Scots, at least) to assert some political and economic independence in the face of England. Relations between England and Scotland in the mid-late 1600's were...less than awesome. There were a handful of various sized conflicts between England and Scotland that were leaving a bad taste in everyone's mouth.
The Panamian territory (which was considered part of the viceroyalty of Peru back then) was very "untamed", so to speak. The Spanish only controlled a minimal portion of Panama. There was very heavy native resistance to Spanish colonization and the immensely dense subtropical jungle geography made settling the place a pain in the neck. The Scottish settlers learned all too quick about the pains of Panama's geography when they settled there.
In many ways, the Darien colony was doomed to failure. The colonists were by no means prepared for the harsh terrain of Panama and their attempts to trade with nearby English colonies ran afoul when King William issued declarations forbidding trade with the Scottish colony.