Despite its poor performance during most of 1942, III./KG 40's ability to attack Allied shipping was improved late in the year. During the last months of 1942 the unit received 18 C-4 variants of the Fw 200 which were fitted with the
Lotfe 7D bombsight. This sight reduced the Condors' vulnerability to anti-aircraft fire by allowing them to bomb targets from medium altitudes; previously they had only been able to attack accurately from low levels. Several of the unit's Condors were also fitted with surface search radar, which improved their ability to locate Allied ships. In early 1943 it was decided to use these aircraft to renew attacks on convoys travelling to Gibraltar in an attempt to disrupt the Allied buildup in the Mediterranean during the
Tunisian campaign. These attacks began in early March and were conducted off Portugal between
Lisbon and
Cape St Vincent; this area was beyond the range of Allied fighter aircraft based in Gibraltar, and few escort carriers were available to protect convoys. III./KG 40 sank five merchant ships and damaged another two between March and the start of July, for the loss of at least five Condors. In response, the British began to use
de Havilland Mosquito fighters to patrol the
Bay of Biscay, deployed four additional
squadrons of patrol aircraft to Gibraltar, and embarked
signals intelligence teams on board warships in the Bay of Biscay to monitor KG 40's radio communications. In February 1943 the British Government decided to transfer the recently raised
81st (West Africa) Division from West Africa to India to take part in the
Burma campaign. This unit required much more shipping space than other British divisions, as its fighting units were supported by thousands of
porters. To facilitate the division's movement, additional troopships were assigned to the regular WS convoys. The 81st Division's advance parties departed Freetown with Convoys WS 29 and WS 30 in April and May, and the
6th (West Africa) Brigade embarked on ships of Convoy WS 31 at
Lagos between 2 and 10 July. It was planned to transport the division's two remaining brigades in convoys WS 32 and WS 33. The
5th (West Africa) Brigade was the second of the 81st Division's brigades to be shipped from West Africa. The brigade comprised 12,000 personnel and was scheduled to depart with Convoy WS 32 on 31 July. The liners
Britannic,
Largs Bay and
Tamaroa were available in Freetown to carry 8,528 of these men, and it was decided to sail the troopship
SS California directly from the Clyde to provide the remaining berths.
California was a liner that had spent the first years of the war as an
armed merchant cruiser before being converted to a troopship. She had previously carried troops to
Bombay in India as part of convoys WS 22 and 26. She returned to the Clyde from Gibraltar on 4 June as part of Convoy MFK 15 and spent the next month docked in
Glasgow undergoing repairs. Once this work was complete,
California began to embark 470 personnel bound for West Africa on 4 July. She was to be accompanied on this voyage by
SS Duchess of York, which had been tasked with carrying 600
Royal Air Force personnel and civilians to West Africa, but had missed an earlier convoy owing to electrical problems. Like
California,
Duchess of York was a pre-war liner which had been converted to a troopship. Prior to the ships' departure it was decided to use
Duchess of York to transport elements of the 5th (West Africa) Brigade to Bombay after the ships arrived at Freetown, while
California would instead carry other West African personnel to the Middle East. ==Attack==