More than 1,000 angry shepherds broke through police lines into the grounds of Romania's Parliament Tuesday to protest a law that regulates the number of sheepdogs they can use and bans them from grazing sheep during the winter.

Riot police fired tear gas at the angry shepherds, some of whom were dressed in floor-length sheepskins and blowing horns, to keep them from charging at the Parliament building. There was a tense standoff between hundreds of riot police, some mounted on horses, and the shepherds. They did not bring their dogs to the demonstration.

Some 4,000 shepherds traveled from rural parts of Romania for the protest, some taking the bus 300 miles from western Romania.

"We can't live without sheepdogs who scare off the wild animals," said Traian Nica, a 49-year-old shepherd. "We want our rights back."

Grigore Popa, 68, waved a big stick and shouted: "I was born among the sheep and we will cut lawmakers' heads off."

Ionica Nechifor, general secretary of the Romovis sheep farming federation, told The Associated Press: "This law is an aberration, it is unconstitutional; they are trying to take away our sheep farms."

Farmers are angry about a recent law that will limit the number of dogs that can guard their sheep and also a ban on grazing from December to April. They say it is an attack on their rights and centuries of sheep-rearing traditions in rural Romania.

The law says that shepherds can use a single sheepdog for sheep grazing on the plain and a maximum of three for mountain flocks. If shepherds flout the law, extra dogs can be shot.

Sheep farming forms the backbone of rural Romania, home to some 10 million sheep and 1.5 million goats.

Supporters of the law say it will protect animals targeted by hunters, such as wild boar and deer, from the Carpathian shepherd dog, a large indigenous canine. They also say that keeping the sheep off the pastures will protect the environment.

Hunting is a popular pastime among Romania's elite.

Agriculture Minister Achim Irimescu said Tuesday he supported the shepherds' demands, in an interview with Digi24 television station. "We have to change the law, it is urgent," he said.