TRIPOLI, Libya -- American writer and filmmaker Matthew VanDyke says he thought he was going to die when a crowd wrestled open his jail cell after six months of solitary confinement.

Instead of an angry gang fired by government propaganda, however, it was rebels and prisoners breaking him out of Tripoli's notorious Abu Salim prison, he told Associated Press Saturday.

VanDyke was captured by government soldiers in the eastern oil town of Brega and then held incommunicado for six months in Tripoli -- a third of it in a small cell.

The 32-year-old freelance writer and filmmaker now plans to stay in Libya until, he said, the whole country is free.