A longtime New Jersey mayor, who is Muslim, says he believes he was racially profiled when he and his family were held at an airport for hours after returning home from Turkey last month.

Mayor Mohamed Khairullah says he was racially profiled at an airport after returning home from Turkey in August. Mayor Khairullah / via YouTube

Mohamed Khairullah, who has been the mayor of Prospect Park since 2005, wrote on Facebook on Aug. 2 that U.S. Customs and Border Protection agents confiscated his phone after detaining him for hours at John F. Kennedy International Airport. "Arab and Muslim Americans know that story very well," he wrote.

He appeared in a video posted to YouTube on Sunday saying attorney Ahmed Mohamed, the litigation director for New York's Council on American-Islamic Relations, had helped him to finally get his phone back.

Khairullah said during a news conference Friday that the trip to Turkey to visit family started off rocky. He held up his 14-month-old's boarding pass. It was marked with "SSSS" — secondary security screening selection — or "the highest level of search," he said. Khairullah is married with four children.

When the family arrived back in New York, they were held by CBP agents for nearly three hours and asked questions that Khairullah called "flat-out profiling."

"They started asking me, 'do you know about any terrorist groups forming over there, or did you meet any terrorists?' And that’s when I felt insulted after serving my community for over 18 years as an elected official," Khairullah said in the video he posted on YouTube Sunday. "I felt that I was selected basically because of my name and identity."

When Khairullah wouldn't answer the questions he considered offensive, the agents told him they would have to seize his phone. He didn't get it back for almost two weeks.

"It is profiling. It happens every day to American citizens who happen to be Muslim," Mohamed said. "And the only reason they’re taken back to secondary inspection and questioned that way is because of their faith, what they happen to be wearing, and what direction they pray."

Khairullah fled Syria in 1980, became a U.S. citizen in 2000 and a year later became a councilman in Prospect Park, which has a population of about 6,000. He also served as a volunteer fireman for five years, and has been on numerous overseas aid trips, according to his website.

"All of these hours of community service obviously doesn’t matter when my name is Mohamed Khairullah," he said during the news conference.

Khairullah said he may pursue legal action after his airport detainment and the seizure of his phone, but is primarily speaking out about what happened to prevent others from facing the same "frustrating and terrifying experience."

"This is not about me only. This is about out civil rights. This is about ending profiling and Islamophobia," Khairullah said.

A CBP spokesperson said the agency can't comment on an interaction with a specific individual, but is "committed to preserving the rights and privacy of all people while conducting necessary and lawful actions to secure our borders."

The spokesperson said "all international travelers arriving to the U.S. are subject to CBP inspection," and a "minuscule" number of travelers face inspection of their electronic devices.

Rep. Bill Pascrell Jr., D-N.J., offered his support for Khairullah in a statement Friday.

"Mayor Khairullah’s account describes profiling against Muslims. If he was targeted by authorities as a criminal or even a national security threat for no reason, the Mayor deserves answers on his detention," the statement said. "We have heard too many reports of Americans being harassed for their names, their skin colors, and their national ancestries."