NEW DELHI — Rowdy protests against a contentious new citizenship law swept India on Thursday, and the authorities responded by shutting down the internet, barricading roads and arresting hundreds of protesters, revealing an Indian government increasingly on edge.

In Bangalore, Ramachandra Guha, a pre-eminent biographer of Mohandas K. Gandhi and a critic of the citizenship law, was midsentence in speaking to a reporter when helmeted police officers carrying sticks grabbed his arms and dragged him away. It was all captured on video.

“Our protest is totally nonviolent,” Mr. Guha said, seconds before he was detained. “See what is happening. You see we are totally peaceful. Did you see any violence?”

Mr. Guha was then put into a bus full of other detainees. He was released later in the day.

The Indian news media reported that three people were killed during protests, two in Mangalore and one in Lucknow.