In April 1942 the increasing air attacks on Malta forced the evacuation of the Royal Navy's strike forces based there. The British were forced to run convoys of supplies to Malta and were heavily attacked by Axis aircraft, submarines and surface ships. After a disastrous convoy in June 1942 (the 'Vigorous' convoy) the British didn't attempt another convoy from Alexandria to Malta until November.
In August efforts to re-supply the island centred on a convoy from Gibraltar, Operation Pedestal. However, in re-supplying the island with enough materials to allow the fight to continue, the Royal Navy suffered crippling losses.
After having held a position at El Agheila for only a few weeks, Rommel attacked on 21 January 1942. The British forces were forced back to the Gazala position by the beginning of February. Once there, both sides concentrated on building up their strength. The British were planning an attack in June but Rommel got there first, and attacked on 26 May 1942.
On 14 June 1942, after three weeks of heavy fighting, the British were forced back and the Germans threatened Tobruk. On 20 June German tanks broke through the Tobruk perimeter and the garrison surrendered. By the end of June the British had retreated out of Libya, occupying a defensive position at El Alamein, 70 miles from Cairo. Morale was nonexistent and panicked preparations for evacuating Egypt were made.