My husband and in-laws used to beat me, the woman told police. (Representational)

A Pakistani woman who had been tied with chains for several weeks and tortured by her husband has been rescued, police said.

The husband had allegedly kept his wife locked up at their residence in Sahiwal city for at least 20 days, an officer said. He has been arrested, the Dawn reported.

Alerted by neighbours, the rescue came through on Sunday.

TV footage showed the woman sitting on the floor of a room handcuffed, her shackled feet connected to a wall with a chain.

"My husband and in-laws used to tie me up and beat me," the woman told police after her rescue.

Media reports quoted the police as saying that the man had chained his wife up "on the pretext of her being possessed by demons" and would regularly beat her up brutally.

He had also taken their two children away from her, including an infant.

It was initially suggested that she was of an unsound mind but the woman has refuted the statement. She is currently in police custody.

Investigation officer Afzal Gill told Dawn News TV that the woman would be presented in the court of a magistrate on Monday who will determine whether she requires mental healthcare.

Her children presently live with her husband's family.