When Thomas Weidlein's 18-day nightmare in Iraqi prisons began in April, he thought he was being taken to a tourist office Baghdad for help.

Instead, Weidlein, a 32-year-old real estate salesman from Middleburg, Va., ended up in a secret detention center that bore the facade of an old theater. He spent the next 18 days there and in a larger prison in a terrifying twilight zone of humiliation, interrogation and constant brutality all around him that seemed surrealistic to a middle-class, parochial American on his first trip to the Middle East.

He was released last month only after being forced to sign "confessions" in Arabic that he could not read.

Weidlein met a reporter by chance in the Israeli hotel where he had come to rest, regain lost weight and "straighten my head out again." He recounted a chilling tale of how an innocuous bureaucratic mixup at a border passport booth evolved into accusations of being a Central Intelligence Agency spy, a "Zionist agent" or both.

His story illustrates the pitfalls for American tourists who venture into hostile autocratic states and do not discover until it is too late that there are limitations to the protection U.S. consular officials can provide.

Although his family is widely known and well connected in both Middleburg and Washington - his father owns a real estate firm and a brother-in-law is the son of prominent Washington attorney Edward Burling Jr. - there was little they could do for him.

State Department officials confirmed that the incident took place but would not provide details of the case. Weidlein's brother, John, in Washington, however, said the State Department told him "the whole office in Baghdad was put on it," with little success.

Weidlein, an easy-mannered, soft-spoken businessman who reads voraciously and says he is "hooked on international events," left Middleburg last October on a world back pack trip that included Asia, India, the Middle East, Europe and the Soviet Union.

His Iraqi misadventure began on April 15, when he crossed by taxi from Kuwait into Basra, the southermost city in Iraq, and presented his passport to a border agent. Weidlein says he wasn't paying attention, but the border agent waved him through as if he had stamped the passport with the requested three day tourist visa.

It was not until he reached Baghdad, however, that a clerk at a duty-free shop noticed the missing visa stamp and advised Weidlein to go to the U.S. interests section at the Belgian Embassy to straighten out the matter. The United States does not have diplomatic relations with Iraq.

There, Weidlein said, a clerk took his passport and sent it to the Iraqi Foreign Ministry to be processed, telling Weidlein to stay close to his hotel. After 10 days of waiting and making daily inquires, Weidlein went to the Foreign Ministry, where he said he was shunted from one room to another, cursing his luck at being caught up in a bureaucratic briar patch.

"Suddenly, two armed soldiers came into the waiting room and walked me out to a police van. I thought, 'Well, they're going to deport me, which is okay with me. At least it will get me out of here."

Instead, he said the van went to what looked like a decrepit theater alongside the Tigris River. Weidlein breathed a sigh of relief when he saw a sign that said, "Foreign Tourist Development Bureau."

"We went through a metal gate next door, and when I asked what was going on, a guard shouted, "no speak" Weidlein related.

The first wave of fear Weidlein said he felt was when he saw guards carrying short rubber hoses, and he was blinfolded and shoved into a cell. "I thought, 'Oh my God, this is a long way from Middleburg' and I started praying," Weidlein said.

The began a series of interrogations stretching over eight days, during which he said Irqui officers accused him of being a CIA spy or a "Zionist agent," and demanded that he answer in Arabic.

When he asked to see an American official, Weidlein said he was ignored and shoved back into his tiny, windowless cell, in which a bright light burned around the clock. He said his only bedding was single blanket spread on the concrete floor, and that his food consisted of rice and soup with pieces of gristle.

"The worst thing was the crying. It never stopped. All night long I could hear other prisoners crying. They never beat me, but the crying from the others never stopped, the most pitiful crying I have ever heard. I'll hear that crying the rest of my life," Weidlein said.

He said there were also the sounds of torture - terrifying screams, moaning and the unmistakable thudding of a club against body.

"One night, I heard a terrible commotion from the interrogation room, a gurgling sound as if someone was being choked, and then guards were runnin in and beating and beating. It went on for quite a long time," said Weidlein, who speculated that a prisoner turned on a questioner and tried to choked him.

"The next morning, when I went to the toilet, there was blood all over the floor. I couldn't believe there could be so much blood," Weidlein said.

Weidlein said that during his interrogations, officers demanded that he sign confessions, and that he signed three papers written in Arabic.

"I was crying the whole time. I haven't the slightest idea what I signed. I was determined not to dirty the flag, but it was sign or else. I did say the world is ill informed about what the Palestinians want, and I believe that," Weidlein said.

After eight days in the converted theater, Weidlein said, he was transferred to a larger prison, where he was kept 10 more days in a large cell with 35 other prisoners - Egyptians, Palestinians, Kurds, Turks and one Indian.

"I had lost quite a bit of weight, but for 10 days they fed me well, and I gained some back," Weidlein said.

Finally, he said, the same U.S. Interest Section clerk showed up at the last prison - he recalled her name as Laurie Johnson - and said she had received a letter from Iraqi officials saying, "The investigation of Mr. Weidlein is complete."

Three days later, Weidlein said he was taken from prison, put on a plane to Athens and his ordeal was over, it not his distrust for officialdom of any sort. CAPTION: Picture, THOMAS J. WEIDLEIN . . . at pre-trip party