Citing a lengthy pattern of deception, U.S. Central District Chief Magistrate Judge Suzanne Segal said Nakoula Basseley Nakoula should be held after officials said he violated his probation from a 2010 check fraud conviction.
"The court has a lack of trust in this defendant at this time," Segal said.
Nakoula had eight probation violations, including lying to his probation officers and using aliases, and he might face new charges that carry a maximum two-year prison term, authorities said.
After his 2010 conviction, Nakoula was sentenced to 21 months in prison and was barred from using computers or the Internet for five years without approval from his probation officer.
In July, a 14-minute trailer for the film "Innocence of Muslims" was posted on YouTube, leading to protests around the Middle East. The trailer depicts Muhammad as a womanizer, religious fraud and child molester.
Nakoula, a Christian originally from Egypt, went into hiding after he was identified as the man behind the trailer.
In court Thursday, Assistant U.S. Attorney Robert Dugdale said Nakoula was flight risk, partially because of the uproar over the film. The violence in the Middle East broke out Sept. 11 and has spread since, killing dozens.
"He has every incentive to disappear," Dugdale said.
The balding Nakoula, 55, was handcuffed and shackled in court.
The hearing had an unusual wrinkle as the news media were banned from the courtroom where Nakoula was appearing, and reporters had to watch the proceedings on a TV in a different courthouse a couple blocks away. Court officials didn't give a reason for the decision.
The full story about Nakoula and the video still isn't known.
The movie was made last year by a man who called himself Sam Bacile. After the violence erupted, a man who identified himself as Bacile spoke to media outlets including The Associated Press, took credit for the film and said it was meant to portray the truth about Muhammad and Islam, which he called a cancer.
The next day, the AP determined there was no Bacile and linked the identity to Nakoula, a former gas station owner with a drug conviction and a history of using aliases. Federal authorities later confirmed there was no Bacile and that Nakoula was behind the movie.
Before going into hiding, Nakoula acknowledged to the AP that he was involved with the film, but said he only worked on logistics and management.
When the judge asked him during Thursday's hearing what his true name was, Nakoula said his name was Mark Basseley Youseff and had been using that name since 2002.
Lawrence Rosenthal, a constitutional and criminal law professor at Chapman University School of Law in Orange, said it was "highly unusual" for a judge to order immediate detention on a probation violation for a nonviolent crime, but if there were questions about Nakoula's identity it was more likely.
"When the prosecution doesn't really know who they're dealing with, it's much easier to talk about flight," Rosenthal said. "I've prosecuted individuals who'd never given a real address. You don't know who you're dealing with, and you're just going to have very limited confidence about their ability to show up in court."
A film permit listed Media for Christ, a Los Angeles-area charity run by other Egyptian Christians, as the production company. Most of the film was made at the charity's headquarters. Steve Klein, an insurance agent in Hemet and outspoken Muslim critic, has said he was a consultant and promoter for the film.
The trailer still can be found on YouTube. The Obama administration asked Google, YouTube's parent, to take down the video. But the company has refused, saying the trailer didn't violate its content standards.
Meanwhile, a number of actors and workers on the film have come forward to say they were tricked. They say they were hired for a film titled "Desert Warrior" and there was no mention of Islam or Muhammad in the script. Those references were dubbed in after filming was completed.
Actress Cindy Lee Garcia has sued to get the trailer taken down, saying she was duped.
Associated Press writer Gillian Flaccus contributed to this report.