The Trojan Horse is a tale from the Trojan War about the subterfuge that the Greeks used to enter the city of Troy and end the conflict. In the canonical version, after a fruitless 10-year siege, the Greeks constructed a huge wooden horse, and hid a select force of men inside. The Greeks pretended to sail away, and the Trojans pulled the horse into their city as a victory trophy. That night the Greek force crept out of the horse and opened the gates for the rest of the Greek army, which had sailed back under cover of night. The Greeks entered and destroyed the city of Troy, decisively ending the war.
The main ancient source for the story is the Aeneid of Virgil, a Latin epic poem from the time of Augustus. The event does not occur in Homer's Iliad, which ends before the fall of the city, but is referred to in the Odyssey. In the Greek tradition, the horse is called the "Wooden Horse" (Δούρειος Ἵππος, Doúreios Híppos, in theHomeric Ionic dialect).
Metaphorically a "Trojan Horse" has come to mean any trick or stratagem that causes a target to invite a foe into a securely protected bastion or space. It is also associated with "malware" computer programs presented as useful or harmless to induce the user to install and run them.