FILE- In this Nov. 21, 2018, file photo a traveler waves for assistance as he checks in at an American Airlines kiosk at Washington Reagan National Airport in Arlington, Va. American Airlines said Friday, March 15, 2019, that it is stopping flights to Venezuela because of safety concerns after the pilots’ union told its members to refuse to work the flights. (Carolyn Kaster, File/Associated Press)

FORT WORTH, Texas — American Airlines is stopping flights to Venezuela because of safety concerns after the pilots’ union told its members to refuse to work the flights.

American was the last major U.S. carrier to fly to the troubled country. It flew daily to Caracas and Maracaibo from Miami.

The airline said Friday that it temporarily stopped the flights as it evaluated conditions in Venezuela, where civil unrest has increased amid opposition to President Nicolas Maduro.

“American will not operate to countries we don’t consider safe,” said spokesman Ross Feinstein.

The airline’s decision followed a union president’s order Thursday night that American Airlines pilots refuse Venezuela assignments.

Daniel Carey of the Allied Pilots Association noted that the State Department issued a warning about crime and detention of American citizens in Venezuela. The U.S. pulled its last diplomats out of the country Thursday.

Carey closed his memo by writing, “To reiterate: Do not accept any trips to Venezuela.”

United Airlines and Delta Air Lines stopped flying to Venezuela in 2017, and several foreign carriers have also pulled their flights in recent years.

Airlines started leaving because of disputes over billions the airlines said they were owed by Venezuela’s government, and more recently they have responded to concern over the country’s deteriorating economic and political situation.

The safety of employees became a greater concern after an Air Europa crew was attacked at gunpoint last weekend in Caracas.

Spanish pilots’ union Sepla said two pilots and eight other crew members were going from the airport to their hotel when their van was surrounded by men on three motorbikes who fled after an exchange of gunfire with someone that the airline employees thought was a plainclothes police officer. None of the airline people were injured.

The union asked Air Europa to stop flying to Venezuela after the incident. It said Air Europa responded by telling crews not to stay in the country overnight.

American had for some time already arranged its schedule to avoid crews staying overnight in Venezuela, Feinstein said.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.