New York City Mayor Bill de Blasio illegally crossed the US-Mexico border during his visit to the region last month, according to US Customs and Border Protection.

The federal agency sent New York City police commissioner James O’Neil a letter detailing the mayor’s alleged violation of federal and Mexican law, according to Fox News. A border patrol agent reportedly told Mr de Blasio and his security detail they had crossed illegally, though they were not apprehended at the time.

"The agent informed the group that they had illegally crossed the United States/Mexico Border at a place other than a designated port of entry and that this was a violation of federal law," the letter reportedly read.

Austin Mayor Steve Adler’s office appeared to confirm the exchange between Mr de Blasio’s security detail and border patrol agents took place, saying in a statement: “They observed a border patrol agent briefly speak with a United States law enforcement officer and then the agent left.”

According to the letter, the agent asked the mayor and his team to remain where they were so they could be taken to a legal entry point and inspected, per federal law, but they instead left the scene shortly after the agent.

However, Mr de Blasio’s office is strongly denying that he incident occurred.

'Families belong together' marches across US Show all 11 1 /11 'Families belong together' marches across US 'Families belong together' marches across US Protesters hold up a animal cage during a demonstration in Chicago AFP/Getty Images 'Families belong together' marches across US People protest outside a Border Patrol office during a rally in McAllen, Texas EPA 'Families belong together' marches across US America Ferrera, left, watches as Alicia Keys speaks during a protest of the Trump administration's approach to illegal border crossings and separation of children from immigrant parents in Lafayette Square across from the White House AP 'Families belong together' marches across US Demonstrators cross the Brooklyn Bridge during a march against the separation of immigrant families AFP/Getty Images 'Families belong together' marches across US A crowd gathers on Boston Common during the Rally Against Separation AP 'Families belong together' marches across US Immigration activists march toward the US Capitol to protest the Trump administration's immigration policy in Washington, DC REUTERS 'Families belong together' marches across US US Representative Joseph Patrick Kennedy III addresses a crowd of thousands of protesters on City Hall Plaza EPA 'Families belong together' marches across US Protesters march through the streets in Chicago AFP/Getty Images 'Families belong together' marches across US Maria Montelongo raises her fist at the Families Belong Together rally at the Capitol in Austin, Texas AP 'Families belong together' marches across US Five-year-old Alexa Gonzalez, of Marshalltown, Iowa, holds a sign during a rally to protest the Trump administration's immigration policies AP 'Families belong together' marches across US Demonstrators in Los Angeles, California REUTERS

"The mayor crossed the border with the direct approval and under the supervision of the border patrol supervisor at this port of entry,” Eric Phillips, the mayor’s spokesman, said in a statement to Fox News. ”Any suggestion otherwise is a flat out lie and an obvious attempt by someone to attack the mayor because of his advocacy for families being ripped apart at the border by the Trump Administration.”

Mr de Blasio has been a staunch critic of Donald Trump’s hard-line immigration policies along the southern border, participating in nationwide protests and demonstrations against the administration’s “zero tolerance” policy.

However, several other mayors who visited the region are also highly critical of the policy, which separated migrant families crossing the border until Mr Trump signed an executive order walking it back. None of them have been accused of crossing the border illegally.