Security personnel stand vigil near the historic Red Fort in New Delhi, India. Picture: Altaf Qadri/AP

New Delhi - Indian police detained thousands of people at various venues across the country after they gathered defying a ban to protest against a new citizenship law.

Violence broke out on the streets of Lucknow, capital of Uttar Pradesh state, where stone-throwing protesters clashed with police and set fire to vehicles.

The police used batons and tear gas to disperse the crowds at Parivartan Chowk in Lucknow. Clashes were also reported from the Gujarat capital Ahmedabad.

Elsewhere the protests were largely peaceful with thousands of people detained and shifted out in buses by the police including in Delhi and IT hub Bangalore.

Orders prohibiting large gatherings of people were issued in several parts of the country including parts of Delhi, Bangalore and its suburbs, the entire state of Uttar Pradesh and parts of Madhya Pradesh state.

Protests, largely by students, civil society groups and opposition political parties were planned in several towns and cities across India.

A protestor holds up a placard and sits with others in New Delhi, India. Picture: Altaf Qadri/AP

In Bangalore, protesters who gathered despite the ban were detained including eminent historian Ramchandra Guha, a critic of the government of Indian Prime Minister Narendra Modi.

"I am protesting in a non-violent way. Why are we being stopped?" Guha was seen saying on NDTV news channel as the police dragged him away.

In the national capital more than 1,000 protesters gathering to join a march near the Red Fort were detained, NDTV news channel reported. Most of them were transported away from the area in buses and released.

A large group gathered at Jantar Mantar in the heart of Delhi shouting slogans against the citizenship law and offering roses to the police to show they were protesting peacefully.

A protestor sits inside a jeep after being detained by police in New Delhi, India. Police detained several hundred protestors in some of India's biggest cities as they defied a ban on assembly that authorities imposed to stem widespread demonstrations against a new citizenship law that opponents say threatens India's secular democracy. Picture: Emily Schmall/AP

At least 18 metro stations in a wide swathe of central and old Delhi where demonstrations were planned have been closed.

Police set up barricades at the borders of Delhi and were screening passengers, which led to massive traffic jams.

Voice, messaging and data services and internet were snapped in certain areas of Delhi by service providers, complying with a government order.

Protests were taking place in Chandigarh, Lucknow, Hyderabad, Kolkata, Mangalore and Bhopal among several other cities in 10 states across India, NDTV reported.

Students walk in a rally demanding the withdrawal of the Citizenship Amendment Act and National Register of Citizens (NRC) in Kolkata, India. Picture: Bikas Das/AP

Bans on gatherings of more than five people have been in place in most cities since early morning where police say they refused permission to hold protests.

"Our constitution gives us the right to protest. This is like a police state," said a young student Rishabh Singh who was trying to reach the Red Fort in Delhi.

The controversial Citizenship Amendment Act approved last week makes it easier for non-Muslim illegal migrants from three-Muslim majority countries - Bangladesh, Pakistan and Afghanistan - to acquire Indian citizenship if they are facing religious persecution.

Protestors walk in a rally demanding the withdrawal of the Citizenship Amendment Act and National Register of Citizens (NRC) in Kolkata, India. Picture: Bikas Das/AP

Critics say it goes against India's secular constitution by making religion a basis for granting citizenship.

The ruling Hindu nationalist Bharatiya Janata Party says it will not affect any citizen of India - including Muslims - but is only aimed at giving relief to those who have fled religious persecution in the three Muslim majority countries.

The citizenship law has seen a spate of violent protests in the country over the past week, including in the north-eastern states  bordering Bangladesh where ethnic tribal communities fear an influx of migrants across their borders with Bangladesh.