Rubuta ci gaba don wannan sakin layi - Bayan Yarjejeniyar Fontainebleau da aka sanya hannu tsakanin Faransa da Spain a watan Oktoba 1807, wanda ya amince da mamayewar Fotigal, sojojin Faransa a karkashin jagorancin Janar Junot sun shiga kasar, wanda ya nemi goyon baya daga Birtaniya. A watan Yulin 1808 sojojin da Arthur Wellesley, 1st Duke na Wellington ya umurce su suka sauka a Portugal kuma suka ci sojojin Faransa a yakin Roliça
da kuma Vimeiro. Wannan ya tilasta wa Junot yin shawarwari game da Yarjejeniyar Cintra, wanda ya haifar da kwashe sojojin Faransa daga Fotigal. A watan Maris na 1809, Marshal Soult ya jagoranci wani sabon tafiyar Faransa wanda ya ci gaba zuwa kudu zuwa birnin Porto kafin sojojin Portugal da Birtaniya suka kori su kuma suka janye. Koyaya, barazanar ƙarin mamayewa ta Faransa ta sa Wellington, a ranar 20 ga Oktoba, 1809, don ba da umarnin gina layin karewa a arewacin babban birnin, tsakanin Tekun Atlantika da Kogin Tagus. An gina Lines na Torres Vedras, wanda ya kunshi kagara 152, da sauran kayan aikin soja, da sauri kuma a cikin yanayin babban sirri, a karkashin kulawar Janar Richard Fletcher wanda shine kwamandan Injiniyoyin Masarauta.