ADDIS ABABA, Ethiopia — The Ethiopian government has arrested thousands of people around the capital, Addis Ababa, over the last week and sent many of them to military camps for “rehabilitation,” the authorities said on Monday, as the government sought to respond to mounting criticism from Ethiopians who say it has done little as ethnic violence has flared.

Ethiopia, to a degree unusual in Africa, has long exercised a degree of surveillance and control over its citizens. But earlier this year it embarked on a whirlwind series of reforms, mainly guided by the country’s new prime minister, Abiy Ahmed, 42, a former army officer.

Ethiopia has sought peace with its longtime adversary, Eritrea; it has freed prisoners; opened access to websites and television channels that it had blocked for political reasons; and it invited banned political organizations and their leaders to return from exile.

This has brought more breathing room for Ethiopians and represents a dramatic change in direction for Africa’s second most populous nation — one that until recently had seemed to take China for its model. But amid these changes there have been growing episodes of ethnic violence around the country, and in the middle of this month that violence reached Addis Ababa and the surrounding area.