(CNN) -- It's one thing for tipsy teenagers to break into a county courthouse and clown around with a judge's robe and gavel.
If you're a foreign national suspected of such behavior, you'll get a whole lot more attention.
Five young men learned that Wednesday in San Antonio, Texas, after the FBI and the Department of Homeland Security joined an investigation that will determine whether the incident was an escapade or part of a terrorism plot.
So far, Bexar County officials said Wednesday afternoon, it appears to be a prank.
"I think probably, if their mother found out, she wouldn't approve," Sheriff Amadeo Ortiz said.
Ortiz said the five men who had reportedly been traveling in an RV are from France. Luis Antu, a spokesman for the Bexar County Sheriff's Office, said the men, in their 20s, claimed to be French Moroccan.
Authorities were booking them on burglary charges Wednesday afternoon.
"These individuals had been partying at a couple local bars," Ortiz said. "Evidently, they had been drinking before they got here."
Authorities say two of the men climbed a fire escape and entered through a fourth-floor window shortly before 1:30 a.m. A video image released by authorities shows two people walking or running down a hallway while wearing sombreros.
Alarms sounded. Police quickly had the place surrounded. But they bided their time during the 30-minute incident, authorities said.
"Why rush in there?" the sheriff asked. "There was no urgency to get in there."
The pair exited the courthouse and, along with three others outside, including one sitting in an RV, were arrested.
They were identified as Adil Ajjaid, 27; Camille Huet, 25; Hicham Ajjaid, 25; Mehdi Ajjaid, 21; and Meissa Mithra, 24.
Authorities said they were cooperating.
"All the enhanced security measures that we have taken since 9/11, which has been extraordinary, and you couldn't have had a better result than what you saw last night," County Judge Nelson Wolff said.
Daniel Schneider, chief executive officer of Road Bear RV Rentals and Sales, said four men rented an RV in mid-September at the company's Middleton, New Jersey, location. The friendly young men showed French driver's licenses and said they would return it in about two months. A roadside assistance log showed the men traveled through Florida, Schneider said.
The suspects were in the United States on 90-day visas, Ortiz said. Authorities are tracking where they had traveled and their anticipated next destination.
"There was no reason to think it was terrorism activity of any kind," the sheriff said.
Antu said federal authorities are confirming where the five men have citizenship. Authorities believe they flew to the United States in early September.
According to the security surveillance tape, the two suspects "were playing with a judge's gavel and robes," the spokesman said. "They went into one of the libraries and put on sombreros and were walking around the halls."
Antu says they obtained the sombreros from a display inside the courthouse.
As a precaution, a bomb-sniffing dog was brought to the site and searched the facility.
Authorities will pore over the RV. According to Antu, it had some laptops and a map of the United States but nothing that appeared out of the ordinary.
Asked whether the men appeared intoxicated, Antu said, "that was the suspicion of officers at the scene." Beer cans were found in the courtroom, authorities said.
CNN's Tracy Sabo, Carma Hassan, Devon Sayers, Jim Barnett and Ed Lavandera contributed to this report.