From 1973 onwards, Pan Am significantly struggled. Starting with the oil crisis in 1973 and growing competition, the airline worked to right-size its operations. However, the real blow to Pan Am came in 1978.
In 1978, President Jimmy Carter signed the Airline Deregulation Act into law, which phased out the CAB and deregulated the American airline industry. It was essentially with this stroke that the US officially ended having even a de facto flag carrier.
During the regulated years, Pan Am could not fly domestic routes. The CAB was concerned about Pan Am growing so big it would monopolize the growing air market, so it left Pan Am with operating international routes with few exceptions. The carrier seriously wanted domestic routes, but it never got the breadth that it needed.
So, in 1978, all of a sudden, Pan Am had a limited domestic network and a large international network with nearly no connecting feed. On international routes, Pan Am faced a host of new competitors that seriously threatened its business.
From then on, Pan Am was on the slide. After a rough merger with National Airlines, the carrier went through a difficult 1980s and tried various strategies, including divestment of some assets and fleet advancements, which helped but was not enough for the airline. One thing it could not prepare for was the 1988 Lockerbie bombing and subsequent financial struggles.
In 1991, Pan Am ceased operations, leading to the end of the premier international airline.