 -- The Federal Aviation Administration has launched an investigation after an air traffic controller accidentally told a pilot to turn the wrong way earlier this month, sending the Boeing 777 dangerously close to Southern California's largest mountain range.

A regional air traffic controller outside of Los Angeles had just taken over Taiwan-bound EVA Air flight BR15, which was headed east, but supposed to loop back south to fly over the Pacific Ocean.

Instead of telling the jet to make a right (to a heading of 180), the controller said to make a left (to the north), but still gave the correct heading of 180 degrees, a contradictory message.

The controller quickly alerted the EVA pilot to her mistake, but not before the aircraft made the left turn, coming close to an Air Canada jet that was flying right behind it.

In an effort to separate the two jets, the controller ordered the Air Canada jet to climb and told the EVA plane to remain as its current altitude of 5,000 feet, according to ATC audio provided by LiveATC.net. Federal regulations require planes to be at least three miles away from another object laterally or 2,000 feet above mountains.

But the EVA aircraft soon encountered another problem: it was quickly approaching the San Gabriel Mountains at an altitude of 5,000 feet, which is lower then the nearby 5,700-foot Mt. Wilson. Ninety seconds before the EVA jet entered the mountain region, the controller can be heard sending opposing messages to the pilot.

"Confirm, EVA 015-heavy, maintain 5,000. Left - right - uh, right heading," she told the pilot, according to the audio.

Likely to avoid the mountains, the air traffic controller repeatedly ordered the EVA pilot to turn south.

"Turn southbound, southbound now!" the controller told the pilot over ATC frequency.

Within moments though, the plane entered the mountains.

"EVA 015-heavy, climb maintain 7,000. And turn south now," she repeated.

The plane started to climb and began to turn south, but by the time it flew over the Mt. Wilson area forty seconds later, its altitude was 6,275 feet... only 500 feet above Mt. Wilson. According to data provided by FlightRadar21, the mountain was just outside the jet's left window.

ABC News Aviation Consultant Col. Steve Ganyard explained those final moments in the cockpit were likely extremely hectic.

"No doubt in the cockpit the crew is getting all sorts of warnings [like] 'Pull up, there's terrain ahead.' So they're confused, they're trying to turn and their airplane's trying to tell them they're about to run into the side of a mountain," said Ganyard .

"[But] as airplanes get more sophisticated [and] as they get more capable, it will continue to be human beings that make the tragic errors," Ganyard added. "There might have been some people who were asleep and who never know how close to death they came."

Ultimately, the EVA jet cleared the mountains and continued its journey to Asia. A government official told ABC News the controller is not currently working in the regional tower.

EVA Air, the third safest airline in the world according to JACDEC's 2016 Airline Safety Ranking, said it is working in full cooperation with the FAA and related authorities in the investigation.

ABC News' Erin Dooley, Whitney Lloyd and Alex Stone contributed to this report.