Southwest Airlines Co.’s retreat from Newark Liberty International Airport has set off a turf war at one of the country’s most congested airports.

Southwest plans to stop flying from Newark, N.J., in November after struggling to turn a profit there and cutting capacity nationwide to account for the grounding of its fleet of Boeing Co. 737 MAX jets. The carrier’s absence could free up capacity for other airlines to operate in Newark during peak hours.

Competitors...