Mohamadou Lamine Mbacke, the man who escaped immigration custody earlier this week at John F. Kennedy International Airport in New York, was apprehended in Chicago, authorities said.

The manhunt for Mbacke, the 31-year-old from Senegal described by authorities as a “violent deportee,” ended Friday, U.S. Immigration and Customs Enforcement (ICE) said in a statement.

The escapee was at the airport for deportation to his home country Tuesday evening when he reportedly fled from law enforcement.

“An ICE fugitive who escaped from custody Tuesday night during his removal to Senegal is in federal custody Friday after nearly three days on the run,” ICE said in a statement. Mbacke “was taken into custody without incident at a coffee shop near the downtown Chicago Amtrak station with the assistance from federal partners.”

ICE’s Enforcement and Removal Operations Fugitive Operations team made the arrest.

Initial reports suggested that Mbacke fled authorities while going through security. But according to a complaint filed against Mbacke in the U.S. District Court Eastern District of New York, “while in the gate area, the defendant asked for and received permission to sit approximately eight to 10 rows away from the deportation officers.”

“Shortly thereafter, without authorization from the deportation officers, the defendant departed the gate area,” the complaint said.

Mbacke appeared in court Friday in Chicago and faces an escape charge, said assistant U.S. attorney Joseph Fitzpatrick of the Northern District of Illinois. A judge ordered Mbacke removed to the Eastern District of New York.

Mbacke reportedly managed to elude law enforcement at Gate B23 in Terminal 4 around 8:30 p.m. local time on Tuesday. After escaping, he was captured on surveillance video leaving the airport in a taxi around 9 p.m, ICE said.

According to authorities, Mbacke entered the country legally in 2005. After violating the terms of his status, an immigration judge ordered his deportation in September 2015. Mbacke reportedly has previous criminal convictions for multiple weapons and firearms offenses.

In his initial court appearance Friday afternoon Mbacke waved a detention hearing, an official said. The magistrate judge ordered him to be removed to New York.