CARACAS, Venezuela (AP) — A 35-year-old filmmaker from California has been arrested by Venezuelan authorities who are accusing him of fomenting postelection violence on behalf of the U.S. government.

President Nicolas Maduro said Thursday that he personally ordered Timothy Tracy's arrest on suspicion of "creating violence in the cities of this country." Venezuela's interior minister said Tracy was working for U.S. intelligence, paying right-wing youth groups to hold violent demonstrations in order to destabilize the country after Maduro's narrow election win last week.

Friends and family of Tracy told The Associated Press that he had been in Venezuela since last year making a documentary about the country, which is bitterly divided politically as the socialist heirs of the late President Hugo Chavez struggle to maintain control of a country beset by economic and political turmoil.

The Georgetown University English graduate was a story consultant on the 2009 documentary "American Harmony," about competitive barbershop quartet singing, and produced the recent Discovery Channel program "Under Siege," about terrorism and smuggling across the U.S.-Canada border as well the History Channel series "Madhouse," on modified race-car drivers in North Carolina.

"They don't have CIA in custody. They don't have a journalist in custody. They have a kid with a camera," said Aengus James, a friend and associate of Tracy's in Hollywood, California, and director of "American Harmony."

James described Tracy as "fearless" but also somewhat quixotic.

"This whole thing came about with him at a party in South Florida," he said. "He met this cute girl who says, 'If you really are a documentary filmmaker you'll come tell the story of what is happening in Venezuela,' and if you say something like that to Tim he goes, whether or not he knows a single person there or knows anything about the political situation or the consequences."

Tracy had been detained at least twice before by Venezuela's SEBIN intelligence police. The last time was five days before the April 14 presidential election when he was taking video of a pro-government rally in the port city of Puerto Cabello, said an associate who spoke on condition of anonymity because he did not want to endanger people inside Venezuela.

In Washington, State Department spokesman William Ostick said U.S consular officials in Venezuela are attempting to meet and speak with Tracy. He declined to discuss details of the man's arrest.

Ostick rejected Maduro's repeated allegations that the United States is attempting to undermine Venezuela's government.

"The United States continues categorically to reject any allegations of U.S. government efforts to destabilize the Venezuelan government or to harm anyone in Venezuela," he said. "Tensions in Venezuelan society result from the fact that there was an extremely close election."

Prosecutors said Tracy was arrested Wednesday evening as he tried to fly out of Simon Bolivar International Airport outside the capital, Caracas.

Tracy's father Emmet, of Grosse Pointe Farms, Michigan, said that in his last email his son had asked for some airline miles so he could fly to the United States so they could be together for the father's 80th birthday.

The prosecution said he would be brought to a court hearing Thursday to be formally charged under Venezuela's anti-terrorism laws.

The police had been friendly to Tracy during the previous incidents, with some even agreeing to appear in his documentary, the filmmaker's father said. Emmet Tracy said, however, that the family had begun urging his son to leave the country in light of the volatile political situation.

"Frankly it's the kind of scenario that we were concerned about and kept telling him," Emmet Tracy said.

Tensions in the country have been rising since Maduro beat opposition candidate Henrique Capriles in the April 14 election by less than 2 percentage points. The government insists the opposition fomented violence directed at ruling party supporters and official buildings in the days after the election. The opposition is demanding an audit of the vote, which it says was stolen.

Venezuela's government has long accused the United States of trying to undermine it, moving closer to Cuba, Iran and Russia after a failed 2002 coup attempt against Chavez that the George W. Bush administration initially recognized.

Tracy is the first American in recent memory to be detained in Venezuela on politically related charges, however.

"I gave the order that they detain him immediately, hand him to prosecutors with the proof that there is because nobody can be destabilizing this country, whatever they believe, because they're on the side of the bourgeoisie, no," Maduro said.

James said Tracy's Spanish is passable but not great.

He said Tracy "literally has no political agenda. He is very sympathetic to all sides. He's telling stories about people and what their life is like there."

"He has been involved in telling stories that told that international component. But he certainly never worked for the government," said James.

"He's trying to tell a human story," said James. "My fear is that he's gone in deeper than he should have."