By Lisa Maria Garza

DALLAS (Reuters) - A Texas couple accused of locking up their son in an apartment garage for at least four years did so because they feared he was a rapist who put his family and community in danger, their lawyer told a bail hearing on Friday.

Dane Thyssen, 39, and his wife Jenifer Thyssen, 40, of the Austin suburb of Dripping Springs, were arrested this week and charged with the illegal confinement of their 22-year-old son in a shed-like structure with boarded-up windows.

"He has a history of sex and abusing children, not only in other countries but in this neighborhood, this community. They had him restrained because of their concerns that other people would be harmed," Rip Collins, a lawyer for the couple, told reporters at the court in San Marcos, outside of Austin.

Koystya's captivity was discovered when he was arrested for allegedly breaking into a neighbor's house and stealing women's underwear, according to local broadcaster KXAN-TV.

Police said he escaped his confinement and returned back after the theft. He told investigators he was released once a week to shower and was given a box of food every week.

He was adopted 10 years ago from Kazakhstan and was abused overseas as a child, his uncle told KXAN.

The couple was being held on a $350,000 bond each. Their son was being held for a burglary charge.

(Reporting by Jon Herskovitz; Editing by Will Dunham)