When United Airlines barred a woman from bringing “Dexter the emotional support peacock” on a flight from Newark to Los Angeles earlier this year, the story made national news and went viral on social media. It is easy to understand why. The account, replete with a picture of the iridescent bird perched atop a luggage cart at the gate, was whimsical and mildly outrageous. It also coincided with the news that both United and Delta had tightened their policies on emotional support animals. Various outlets reported that the airlines, having patiently endured people bringing the likes of pigs, monkeys, snakes, turkeys and kangaroos onto planes for years, were finally saying “Enough!”

If only it were that simple.

When it comes to animals on planes, U.S. airlines are stuck in the unenviable position of trying to juggle complex legal mandates, legitimate passenger needs and serious safety concerns. This past March, United found itself facing one of the worst PR nightmares imaginable after a crew member allegedly told a passenger to put her 10-month-old puppy in an overhead bin, where, to the horror of all on the plane, it was found to have died. (As is so often the case these days, the incident went viral on social and mainstream media almost instantly.)

This followed several other troubling incidents involving animals on planes: A 70-pound dog sitting on a passenger’s lap bit a man’s face this past June on a Delta flight. Another canine bit a woman on the leg as she stood in a JetBlue check-in line this past November. In its press release about its policy change, Delta cited a 150 percent increase in passengers bringing animals onto planes since 2015, with an attendant 84 percent jump in incidents such as people being bitten or attacked, or animals urinating or defecating during flights. The change is obvious to any regular traveler: Walk through a terminal or board a plane these days and you will see plenty of four-legged flyers. Some airports have even transformed smoking rooms into places where pets can do their business.

As airlines seek to curb some of the abuses here, they need to make sure that their customer-facing employees understand the legalities involved. Two federal statutes are in play: the landmark Americans with Disabilities Act (ADA) of 1990, and the Air Carrier Access Act of 1986. A simple rubric for employees: Generally speaking, if it happens on the ground, it’s governed by ADA; once you’re on the plane, it’s the Air Carrier Access Act, with the captain as final authority.

The distinction between “service animals” and “emotional support animals” is also critical. On its website, United defines emotional support (and psychiatric service) animals as those “that provide emotional, psychiatric or cognitive support for individuals with disabilities, but may or may not have task-specific training with respect to a disability.” Note that emotional support animals (ESA)—the category to which turkeys, ducks, snakes, peacocks and the like typically belong—often lack any real training to speak of. In many cases, passengers have merely sent money to an Internet site in exchange for things like vests, ID cards and letters from mental health professionals to create the appearance of “certification.” (One site advertises “affordable ESA registration kits” for $54.) We point this out, not to deny the existence of legitimate ESAs, but to highlight that growing numbers of travelers now use these Internet sites to get their pets onto flights for free.

In its new policy, United seeks to make the approval process for traveling with ESAs a bit more rigorous. In addition to requiring 48 hours’ notice and a letter from a licensed medical or mental health professional (again, obtainable online), United is now requiring veterinary health and vaccination forms for these animals, along with documentation that they have been “trained to behave properly in a public setting” (emphasis added). The change applies to emotional support animals only, the airline notes on its website.

That is, again, an important distinction. As United notes on its site, trained service animals are “animals that receive specific training to perform life functions for individuals with disabilities. Examples include animals that assist with visual impairments, deafness, seizures and mobility limitations.” The Americans with Disabilities Act contains specific provisions on service animals (dogs, in particular) as opposed to ESA. It is critical for airline employees to understand that the Act sharply constrains the kinds of questions they may legally ask travelers with trained service animals.

According to the ADA, only two questions may be asked: Is the dog a service animal required because of a disability, and what work or task has the dog been trained to perform. Employees cannot legally ask about the person’s disability or require medical letters, a special ID card, training documentation for the dog or proof that the dog can do what the traveler says it can do. If an employee were to violate these provisions in any way, the airline could easily face litigation by one of those aggressive “drive-by” ADA lawyers and, as we see all too often, a barrage of social media attention.

This is precisely why airlines are asking for more information about emotional support animals, which are not specifically covered under ADA, and leaving unchanged their policies on trained service animals. However, there is a potential snag in requiring, as United has, that ESAs be “trained to behave properly in a public setting”: No federal agency has ever validated a specific training protocol for either emotional support animals or service animals. There are plenty of legitimate, but privately operated, training and certification programs for service dogs. After years of training that can costs tens of thousands of dollars, service dogs can do truly amazing things, from guiding blind pedestrians across busy intersections, to stopping war veterans’ PTSD-induced panic attacks, to preventing children with peanut allergies from eating foods that could kill them. The question, with respect to ESAs, is whether all of those emotional support animals—turkeys, pigs, peacocks and the like—will really be put through the kind of training now required by both United and Delta. One suspects that many will simply find another Internet site that is willing to send them a bogus “certificate of training” in exchange for cash. Without a government agency to set standards for ESA training, how will airlines determine whether an ESA should be given the green light to board the plane? Likewise, evaluating medical letters can be challenging. Legally, the airlines are permitted to verify whether the individual providing the assessment is a licensed mental health professional, and also whether the passenger is under his or her professional care. Under the Air Carrier Access Act (ACAA), they can also investigate the date and type of professional license, as well as the jurisdiction or state in which the license was issued. However, with enough money on the table, the unfortunate truth is that even people with legitimate licenses will be happy to help travelers game the system. Nonetheless, by creating some additional deterrence, U.S. airlines may succeed in reducing the number of problematic ESAs that take to the skies.

As they forge ahead with these efforts—up to and including banning the likes of Dexter the peacock from flights—airlines should tread carefully. Fortunately, while the ACAA specifically allows travel with “any animal that assists persons with disabilities by providing emotional support,” it simultaneously provides some disqualifiers. Airlines may exclude animals that are: too large or heavy; that threaten the health or safety of others; that would disrupt cabin service significantly; or that are prohibited from entering foreign countries. While the government has not yet jumped into the certification business, it has been willing to make a call on which species are acceptable for air travel: According to the ACAA, airlines are never required to accept “snakes, reptiles, ferrets, rodents, sugar gliders or spiders.” An employee’s gut feeling about whether an ESA is acceptable is not enough. By sticking to the letter of the law, airlines will be on safe legal ground.

Veterans of aviation remember the days when air travel was largely stress-free. Showing up 10 minutes before your departure time, you simply took your place among smartly dressed passengers who had paid stiff sums to travel in style with a high degree of service. With time, air travel became a more pedestrian affair. Then, of course, everything changed on Sept. 11, 2001. Since that awful day, air travel has been a vastly more stressful undertaking for all involved. No doubt this higher level of stress is part of the reason for the general increase in pets on planes. Yes, some travelers are abusing airlines’ goodwill in order to travel with their animals for free. However, it is important to remember that the system, by and large, works. Millions of service animals have safely flown on U.S. airlines over the years, but such nonevents never go viral on Instagram, YouTube or Twitter. If airlines can succeed in curbing excess and abuse, thus leaving the current framework largely in place, it will all be for the good. Otherwise, intervention by the federal government, with all of the unintended consequences this typically entails, is the likeliest scenario. In the worst case, that could make flying more difficult for disabled passengers who really are helped by having a four-legged friend by their side.