The Lines of Torres Vedras were a series of defensive forts to defend Lisbon against the French during the Peninsular War. They were ordered by Lord Wellington- and built in secrecy by Portuguese workers between September 1809 and November 1810.
It was the only way to prevent the larger French army from reaching Lisbon. The rapid construction of these three defensive walls was a complete success. When Masséna brought the French army up to the lines, he knew at once that he could not win a battle here. He asked his Staff why they had not known about them in advance.
'Wellington made them,' was the reply.