The Federal Aviation Administration is investigating an incident in which a passenger aircraft was given wrong directions by traffic controllers and guided toward the San Gabriel Mountains, where it flew just hundreds of feet higher than the peak of Mt. Wilson before turning around, according to publicly available flight data.

Bound for Taiwan, the EVA Air Boeing 777 took off to the east early Friday from Los Angeles International Airport’s south runway complex, according to FAA spokesman Ian Gregor. After takeoff, the air crew switched from the LAX control tower to the approach control operations in San Diego, which Gregor said was common practice.

“The air traffic controller at the approach control who was handling EVA instructed the pilot to make a left turn to a 180-degree heading,” he said. “She meant to tell the pilot to make a right turn to a 180-degree heading.”

Following the controller’s instructions, the pilot turned left.

The move sent the plane in the wrong direction, Gregor said.

Instead of flying south, the aircraft flew north toward the San Gabriel Mountains and an Air Canada jet that had departed from the north runway complex at LAX.

When the controller realized the mistake, she “took immediate action to keep EVA safely separated” from the second aircraft as well as ground terrain, Gregor said. She issued the EVA pilot a series of instructions to help him turn south.

“The controller wanted to make sure the EVA aircraft was safely above or away from nearby terrain,” he said.

The conversation between the pilot of EVA 015 and the controller was posted by VASAviation on Youtube. At one point during the flight, the controller asks the pilot, “What are you doing? Turn southbound now.”

A graphic depiction of the aircraft’s flight path, altitude and speed on the website Flightradar24.com shows the plane turning north and flying over Pasadena toward the San Gabriel Mountains. Just five minutes after takeoff, the plane is hovering 5,000 feet over Eaton Canyon when it begins turning away from the mountain range and heading south.

As the aircraft banks directly to the south of Mt. Wilson, it continues to gain altitude and appears to fly between 500 and 800 feet higher than the Mt. Wilson Observatory, which stands roughly 5,710 feet high, according to the website data. The aircraft’s lateral distance from the mountain peak appears to be between 500 and 600 meters.

In a statement issued Tuesday, EVA Air said, “our flight was never too close to other aircraft or to the mountains.”

The pilot of the aircraft was directed to take off from Runway 7 and complied with the air traffic controller’s direction and speed instructions.

“EVA is working in full cooperation with the U.S. Federal Aviation Administration and related authorities in the investigation of this situation,” the statement said.

FAA regulations require that airliners be separated by at least 3 miles laterally, or 1,000 feet vertically. The regulations also require airliners to be at least 3 miles away laterally or 2,000 feet vertically above obstacles such as mountains.

Asked whether the aircraft had violated those restrictions, Gregor said the FAA was looking into how high the aircraft was flying above the ground northeast of the airport.

“The question is how close did they come to the terrain,” said Jon Russell, an air transport pilot and the Western-Pacific regional safety coordinator for the Air Line Pilots Assn. “Did a terrain warning sound in the cockpit?”

FAA officials said they did not know Tuesday afternoon whether such a warning occurred.

The flight had 353 people on board, including five infants, an airline spokeswoman said.