MANAGUA, Nicaragua—Hundreds of heavily armed police and paramilitary forces loyal to President Daniel Ortega swarmed Masaya on Tuesday, recovering control of the city’s last rebel neighborhood after fighting for hours to quell protests demanding the leader’s ouster, human rights activists, residents and church officials said.

Videos posted by residents on social media showed dozens of pickup trucks filled with armed men streaming into the indigenous Monimbó neighborhood of Masaya early Tuesday morning. The city, south of the...