The raid could add tension to the relationship between the two institutions as each struggles to respond to an eight-year-old war with Boko Haram.
About 5 a.m. on Friday, soldiers entered a tent camp housing United Nations workers in Maiduguri, the birthplace of the Islamist militancy, and searched it for about three hours, a statement from the United Nations said.
The camp is a base for some of the dozens of organizations providing food, water and shelter for nearly seven million people who have been left homeless or without basic necessities in the wake of the war. United Nations officials said they did not know the reason for the raid.
The United Nations grounded flights, which are used for humanitarian missions, for a day on Friday, and some other aid organizations in the city said they were locked down, with workers staying in their quarters.