FORT LAUDERDALE, Fla. – The accused gunman behind Friday's massacre at Fort Lauderdale-Hollywood International Airport faced a federal judge Monday.

Esteban Santiago, 26, appeared before U.S. Magistrate Judge Alicia Valle at 11 a.m. and was appointed an attorney, Bob Berube.

He was also formally charged with performing an act of violence against a person at an airport serving international civil aviation that caused serious bodily injury, using and carrying a firearm during and in relation to a crime of violence and causing the death of a person through the use of a firearm.

Two of the charges carry a maximum penalty of the death sentence.

Prosecutors requested pre-trial detention because Santiago is considered dangerous and a flight risk.

Santiago's detention hearing is scheduled for Jan. 17 and his arraignment hearing is scheduled for Jan. 23.

Security cameras at the airport show who authorities said is Santiago reaching for a gun in his waistband and opening fire in the baggage claim area of Terminal 2.

Travelers dropped to the ground the moment gunshots began sounding, but five people would not make it out alive.

Authorities said six others were injured in the shooting.

Late Monday afternoon, Local 10 learned an investigation was underway into the video that appeared to show the shooting that was leaked to TMZ. Broward County mayor Barbara Sharief said she believe the source of leak is a member of the law enforcement community.

"We are working with the FBI right now. And we know, we are confident it is not the FBI. And at this time it is not a Broward County employee," Sharief said. "We think it was someone in law enforcement."

FBI spokesperson Michael Leverock said agents were aware of the video but would not comment nor would confirm of deny its authenticity.

Formal charges have yet to be filed against Santiago, but he is expected to face multiple federal charges that could carry a death sentence if he is convicted.

A motive for the attack is still unknown, but Broward County Sheriff Scott Israel said Santiago told investigators that a chip was placed in his head by a government agency.

"The CIA or some agency had put a chip in his head and they were programming him and they forced him to watch a video on ISIS, and that changed and (he) said he was paid a certain amount of money by ISIS an hour or two later, so at this point we really don't know," Israel said on Local 10's "This Week In South Florida."

Florida may not have been Santiago's initial destination. Authorities on Monday told ABC News that Santiago initially made a reservation to fly to New York City on New Year's Eve, but cancelled the flight for an unknown reason.

Instead, Santiago later booked a one-way, $278 ticket to Fort Lauderdale, authorities told ABC News.

Santiago's relatives in New York and Puerto Rico told reporters that the military veteran changed after serving in Iraq from 2010 to 2011.

His mother said he witnessed a roadside bomb in Taji kill two fellow 130th Engineer Company soldiers.

While it is unclear if Santiago had been diagnosed with post-traumatic stress disorder, as many as one in five veterans who served in Iraq or Afghanistan develop the affliction each year, according to the U.S. Department of Veterans Affairs.