The New York transportation worker arrested this week, accused of participating in the deadly Capitol riots, was granted bail Wednesday during a federal court hearing. 

Magistrate Judge Judith McCarthy granted William Pepe a $10,000 bond, ordered him to wear a GPS monitor and imposed a 10 p.m. curfew during his initial court appearance. In addition, he is barred from traveling outside the Southern and Eastern court districts of New York state. 

He will be allowed only to travel to Washington for court appearances. He was arrested by the FBI on Tuesday in White Plains, N.Y.

CAPITOL RIOTING LEADS TO SHATTERED GLASS AND DEBRIS, MAKESHIFT BARRICADES: SEE THE AFTERMATH

William Pepe, 31, a New York transportation worker, was arrested Tuesday for his alleged role in the Capitol riots.

William Pepe, 31, a New York transportation worker, was arrested Tuesday for his alleged role in the Capitol riots.

Pepe is charged with knowingly entering or remaining in any restricted building or grounds without lawful authority.

"Mr. Pepe, the actions you took on January 6, 2021, have changed the trajectory of your life," McCarthy said during the remote court hearing. "If you do anything while you are on bail, you can only make it worse for yourself." 

Pepe, 31, a laborer for the Metro-North commuter railroad, was suspended without pay after calling in sick to travel to Washington, the Metropolitan Transportation Authority told Fox News. 

"Participation in the riot which resulted in deadly violence at the Capitol last week was abhorrent to the values of the MTA and New Yorkers, and those who attacked that symbol of American democracy disqualified themselves from working for the People of New York," MTA Communications Director Tim Minton said in a statement. "Mr. Pepe is entitled to due process and was suspended last week as part of that process. We are cooperating with federal law enforcement agencies in their investigation and prosecution of those involved."

CLICK HERE TO GET THE FOX NEWS APP

Pepe was represented by a federal public defender Wednesday, but is in negotiations to hire a private attorney. At one point, prosecutors advised him to obtain a new cell phone because a search warrant will be sought for his current device.  

His next court hearing is scheduled for Jan. 22, which will also be held virtually from Washington.