Two hair bandits on a motorcycle grabbed a housewife, pulled out a machete and cut off the long locks she had been growing for two decades, police say.

The woman told police she was walking to church when she was assaulted late on Tuesday, police officer Antonio Williams da Silva said from the northeastern Brazilian city of Aracaju.

"She was an evangelical and said she hadn't cut her hair for 20 years,'' da Silva said.

"It must have been nearly [4.8 feet] long.''

The robbers cut the woman's hair above her shoulders, he said, apparently with the idea of selling it to be fashioned into a wig.

"A hairpiece that size could cost you as much as 1000 reals [$561],'' da Silva told Associated Press.

Da Silva said it was the second recent case of hair robbery in Aracaju.

Similar attacks have occurred in other Brazilian cities, where the demand for human hair is high.

Last year, bandits wielding scissors boarded a bus in Rio de Janeiro and cut off the hair that 22-year-old Mirna Marchet had been growing for four years.