After the Pearl Harbor Attack in December 1941, the squadron initially remained on standing alert at Albrook, but dispatched "C" flight to Salinas Airport, Ecuador, to provide aerodrome defense for that strategic point on 2 February 1942.
The remainder of the Squadron moved to the La Joya #2 Aerodrome 09°04′59″N 079°19′00″W on 12 March 1942, where they remained until returning to Albrook on 30 September, having been re-designated as the 24th Fighter Squadron on 15 May. For the first four months that the unit was at La Joya #2, they had operated off the very primitive dirt runway there.
This field was 25 miles north east of Albrook, just off the main Pan-American Highway to Chepo.
It was, however, well situated as, just off the runway was heavy jungle growth, which offered excellent revetments and camouflage.
The unit had also transitioned from its P-40C's to Bell P-39D Airacobras starting 2 May 1942, when it acquired 10 of these aircraft From the 53d Fighter Group.
The field at La Joya became flooded (due to the rainy season) in September 1942, forcing the return of the unit, somewhat ahead of schedule, to Albrook, where conditions were very crowded.
By then, the P-39D's had been exchanged for 14 P-39K's.

On 15 October 1942, eight P-39K's were dispatched on a mission near Rio Hato to graphically illustrate the effectiveness of the cannon-armed fighter as a ground-attack aircraft.
The Airacobras attacked a column of derelict trucks positioned there and, when the dust settled, all but five of the 115 vehicles had been completely destroyed.
 In addition, between November 1942 and 11 January 1943, the Squadron also had a solitary Douglas P-70 night fighter, which it maintained and operated on behalf of the XXVI Fighter Command at Albrook.
This was the rather weak Sixth Air Force response to a concern over the lack of night fighter defenses for the Panama Canal.

The respite at Albrook was short-lived, however, as it had now become the policy of Sixth Air Force to rotate its Fighter Squadrons in and out of remote bases for practical as well as for morale purposes.
Thus, on 17 January 1943, (with a total of 17 aircraft on hand) the Squadron took up residence again at La Joya #2, following the arrival of the dry season, where it stayed until 28 May, when it returned once again, briefly, to Albrook.
However, just prior to the return to Albrook on 24 May, 12 P-39K's flew in support of three Navy PT Boats in a simulated dive-bombing and strafing attack on two Navy Destroyers some 10 miles south east of Taborquilla Island.

The next move, however, was to Howard Field (after being yet again flooded out at La Joya), on 9 June 1943, although Flight "E" was detached to serve on Rey Island in the Bay of Panama on 15 June (Punta Coco Airfield,at southern tip la Esmeralda peninsula).
Also, the Squadron, for reasons unknown, received four P-39D's which had previously been stationed at Losey Field, Puerto Rico.
Fortunately, however, the Squadron flew its last P-39 missions on 25 June 1943 and, ironically, these were replaced on 27 June 1943 by two refurbished Curtiss P-40C's and on 29 June two new P-40N Warhawks.
From that point through until August, the Squadron transitioned into new P-40N's, 22 of which were on hand by the end of that month.
 Meanwhile, the detachment at Rey Island ("E" Flight) was joined by "F" Flight, and these were amalgamated into one very large "E" Flight, still on Rey Island.

On 27 August 1943, flying their new P-40N's, "A" and "B" Flights flew a most interesting mass cross-country to Costa Rica.
The next day, they flew down the Atlantic side of the Isthmus of Panama – completely undetected – and made a successful surprise "attack" on the Gatun Locks of the Panama Canal. "
B" Flight made three dive-bombing attacks from 10,000 feet while "A" Flight made four strafing passes.
Defending interceptors, finally alerted to the proceedings, didn't show up until the attack was completely over.
  Effective 1 November 1943, the Squadron was officially assigned directly to the XXVI Fighter Command and, by 31 December, had totally
After the Pearl Harbor Attack in December 1941, the squadron initially remained on standing alert at Albrook, but dispatched "C" flight to Salinas Airport, Ecuador, to provide aerodrome defense for that strategic point on 2 February 1942. The remainder of the Squadron moved to the La Joya #2 Aerodrome 09°04′59″N 079°19′00″W on 12 March 1942, where they remained until returning to Albrook on 30 September, having been re-designated as the 24th Fighter Squadron on 15 May. For the first four months that the unit was at La Joya #2, they had operated off the very primitive dirt runway there. This field was 25 miles north east of Albrook, just off the main Pan-American Highway to Chepo. It was, however, well situated as, just off the runway was heavy jungle growth, which offered excellent revetments and camouflage. The unit had also transitioned from its P-40C's to Bell P-39D Airacobras starting 2 May 1942, when it acquired 10 of these aircraft From the 53d Fighter Group. The field at La Joya became flooded (due to the rainy season) in September 1942, forcing the return of the unit, somewhat ahead of schedule, to Albrook, where conditions were very crowded. By then, the P-39D's had been exchanged for 14 P-39K's.
On 15 October 1942, eight P-39K's were dispatched on a mission near Rio Hato to graphically illustrate the effectiveness of the cannon-armed fighter as a ground-attack aircraft. The Airacobras attacked a column of derelict trucks positioned there and, when the dust settled, all but five of the 115 vehicles had been completely destroyed.  In addition, between November 1942 and 11 January 1943, the Squadron also had a solitary Douglas P-70 night fighter, which it maintained and operated on behalf of the XXVI Fighter Command at Albrook. This was the rather weak Sixth Air Force response to a concern over the lack of night fighter defenses for the Panama Canal.
The respite at Albrook was short-lived, however, as it had now become the policy of Sixth Air Force to rotate its Fighter Squadrons in and out of remote bases for practical as well as for morale purposes. Thus, on 17 January 1943, (with a total of 17 aircraft on hand) the Squadron took up residence again at La Joya #2, following the arrival of the dry season, where it stayed until 28 May, when it returned once again, briefly, to Albrook. However, just prior to the return to Albrook on 24 May, 12 P-39K's flew in support of three Navy PT Boats in a simulated dive-bombing and strafing attack on two Navy Destroyers some 10 miles south east of Taborquilla Island.
The next move, however, was to Howard Field (after being yet again flooded out at La Joya), on 9 June 1943, although Flight "E" was detached to serve on Rey Island in the Bay of Panama on 15 June (Punta Coco Airfield,at southern tip la Esmeralda peninsula). Also, the Squadron, for reasons unknown, received four P-39D's which had previously been stationed at Losey Field, Puerto Rico. Fortunately, however, the Squadron flew its last P-39 missions on 25 June 1943 and, ironically, these were replaced on 27 June 1943 by two refurbished Curtiss P-40C's and on 29 June two new P-40N Warhawks. From that point through until August, the Squadron transitioned into new P-40N's, 22 of which were on hand by the end of that month.  Meanwhile, the detachment at Rey Island ("E" Flight) was joined by "F" Flight, and these were amalgamated into one very large "E" Flight, still on Rey Island.
On 27 August 1943, flying their new P-40N's, "A" and "B" Flights flew a most interesting mass cross-country to Costa Rica. The next day, they flew down the Atlantic side of the Isthmus of Panama – completely undetected – and made a successful surprise "attack" on the Gatun Locks of the Panama Canal. "B" Flight made three dive-bombing attacks from 10,000 feet while "A" Flight made four strafing passes. Defending interceptors, finally alerted to the proceedings, didn't show up until the attack was completely over.   Effective 1 November 1943, the Squadron was officially assigned directly to the XXVI Fighter Command and, by 31 December, had totally 
24th Fighter Squadron