Two militant groups believed to be responsible for the deaths of thousands of people in northeast and central Nigeria have been designated as foreign terrorist organizations, the State Department said Wednesday.

Ansaru and Boko Haram, which has links to al Qaeda, have been waging a brutal campaign against military, government and civilian targets in Nigeria, Africa's most populous country and a top oil exporter.

The two also are specially designated global terrorist groups under federal law to help U.S. and other law enforcement agencies investigate and prosecute suspects associated with the two extremist networks. The two designations mean that business and financial transactions with the organizations are blocked.

"By cutting these terrorist organizations off from U.S. financial institutions and enabling banks to freeze assets held in the United States, these designations demonstrate our strong support for Nigeria's fight against terrorism and its efforts to address security challenges in the north," Lisa Monaco, President Obama's top counterterrorism adviser, said in a statement.

According to the State Department, Boko Haram carried out attacks in Benisheik, Nigeria, in September 2013 that killed more than 160 civilians. Boko Haram also has conducted attacks against international targets, including a suicide bombing of the United Nations building in the capital, Abuja, in August 2011, which killed 21 people and injured dozens more, including aid workers supporting development projects across Nigeria.

Ansaru's attacks have focused on Nigerian military and Western targets. In November 2012, Ansaru raided a police station in Abuja, killing Nigerian police officers and freeing militant prisoners. In January, Ansaru attacked Nigerian security services when its members ambushed a convoy of Nigerian peacekeepers. Ansaru has also conducted several kidnappings of foreigners living or working in Nigeria.