"The members of the Security Council condemn in the strongest terms the recent terrorist attacks perpetrated by Boko Haram," a statement said on Tuesday.
"The members of the Security Council reminded States that they must ensure that measures taken to combat terrorism comply with all their obligations under international law, in particular international human rights, humanitarian and refugee law," Xinhua quoted the statement as saying.
Boko Haram militants on Sunday, disguised as preachers killed at least 24 people and injured several others in an attack near a mosque in Nigeria's Borno state. The attackers gathered people at a mosque in the village of Kwajafa and then opened fire on them.
In February, Boko Haram militants carried out an attack on Chad, the first such assault in the region, which claimed at least seven lives.
Meanwhile, the council members also "stressed the need to adopt a comprehensive approach to successfully combat Boko Haram and the threat it poses to the region", the statement said.
The council members "reaffirmed the need to combat terror by all means, in accordance with the Charter of the UN, threats to international peace and security caused by terrorist acts", the statement added.