In the week since Muhammadu Buhari was inaugurated as president of Nigeria, vowing to eliminate Boko Haram, the extremist group has responded with a series of deadly bombings that have killed dozens of people across the country's northeast.

Those attacks have underscored the enormous task ahead for Buhari, a former military dictator who was seen by many as the right man to rid the country of terrorism. They have also highlighted the challenge for the United States, which is eager to defeat Boko Haram but leery of offering Nigeria a large increase in military assistance before its security forces — known for serious human rights abuses — are restructured.

The next chapter of the fight against Boko Haram could be the most difficult.

"I think we might be seeing the end of the large battlefield phase of this, but if Boko Haram goes back to hit-and-run tactics, it could be even harder for Nigerian military forces," said a senior U.S. official who spoke on the condition of anonymity because he was not authorized to speak publicly about bilateral relations.

The Nigerian military has said for months that Boko Haram has been forced out of key cities and villages in operations that seemed to lay the groundwork for the group's elimination after Buhari took power. Instead, the past week has been the bloodiest in recent months.

Militants conducted attacks near Maiduguri International Airport last week, killing eight, and in a mosque, killing about 25. Then, on Tuesday, a man blew himself up in a slaughterhouse in the same city, killing about 40. Maiduguri, a major city in the northeast, was among the places where Nigerian security forces said they had vanquished Boko Haram. Over the past few months, there had been relatively few attacks, and the city's markets and streets were packed. In the most recent attack, on Thursday night, militants bombed a market in the northeastern city of Yola, killing at least 31 and wounding dozens, according to Nigerian officials.

The surge in attacks comes as the military has found itself under greater scrutiny for human rights violations. A report released Wednesday by Amnesty International alleged that the military had caused the deaths of about 8,000 civilians since 2009. Some were executed, the report said, but the majority died in military custody.

"Former detainees and senior military sources described how detainees were regularly tortured to death — hung on poles over fires, tossed into deep pits or interrogated using electric batons," said the report. It named five military officers who it said should be investigated by Buhari's government.

Now, the United States is trying to navigate ways to support Nigeria's new leader, who bills himself as a reformer, without violating U.S. legislation that prevents the country from giving aid to human rights abusers. The authors of the Amnesty International report suggested that foreign funding to the military should continue, but that a more robust effort should be made to punish those responsible for human rights violations.

"For a long time, many states supported the military and police with human rights training, but that hasn't led to the results we would hope for," said Daniel Eyre, Amnesty International's Nigeria researcher. "Until you hold them accountable, you can train them all you like, but they will continue committing those violations."

So far, U.S. officials say they are confident that they can increase military assistance while simultaneously encouraging the Nigerian military to improve its record. The so-called Leahy amendment prohibits the approval of U.S. assistance to foreign military units that violate human rights.

"The way you help struggling military to get better is to roll up your sleeves and help, but it doesn't mean you turn a blind eye to the bad stuff," said the senior U.S. official.

For his part, Buhari, who received training in the 1980s at the U.S. Army War College in Pennsylvania, appears eager for more U.S. military assistance.

"He's looking for us to continue that and to expand our assistance," said the senior U.S. official. "We're willing to look at new forms of training, equipment and these kinds of things," including the expansion of intelligence sharing.

The U.S. official described American interactions with Buhari at this point as "broad, high-level discussions."

The United States gave $6.3 million to the Nigerian military and police in 2014, despite tensions with former president Goodluck Jonathan's administration, which often appeared to shrug off claims of human rights abuses.

Meanwhile, insurgents appear to be intent on proving their capacity to launch deadly attacks. In a 10-minute video released Tuesday, the group rejected the military's claims of success.

"Most of our territory is still under our control," said an unidentified man featured in the video, who was carrying an AK-47 and standing in front of two SUVs.

Also in the video, militants show the identification cards of soldiers they claim to have killed and the wreckage of a jet they say they brought down.

But the group's leader, Abubakar Shekau, is notably missing from the video, raising questions about whether he was injured or killed in Nigeria's military offensive in the northeast.

Even if Shekau is dead, analysts have long warned that Boko Haram could retain its capacity to conduct periodic attacks for months or years after insurgents have lost ground in their traditional strongholds. Most of the fighters appear to have fled to the Sambisa Forest, a vast and mostly uninhabited stretch of land where they appear to be able to move freely.

"Here in Sambisa you can travel more than four to five hours under the black flag of Islam," said the man in the Boko Haram video released Tuesday.

After his victory in a historic election — the first time an incumbent had ever lost a presidential contest in Nigeria — many Nigerians have huge hopes for Buhari, who last ruled the country for less than two years, from 1983 to 1985. In his first week in office, he has already condemned Boko Haram and criticized his predecessor, Jonathan, for allowing the extremists to take root. In his inauguration speech last week, he explained the group's ascent as a product of "official bungling, negligence, complacency or collusion," calling Boko Haram "godless" and "mindless."

He has not articulated a clear strategy to defeat the insurgency, but one of his first directives as president was to move the military headquarters out of the capital and to Borno State, considered Boko Haram's stronghold in Nigeria.

It's unclear how effective that will be. Some experts say that defeating Boko Haram isn't simply about military strategy but addressing how the group emerged in the first place.

"The Buhari administration is going to have to think about the center of the fight not just in geographic terms," said Carl LeVan, a Nigeria expert at American University. "What is really the heart of the battle? Is it retaking Gwoza and other Boko Haram strongholds and holding them? Or is it tackling the broader message about the role of Islam in a multicultural Nigeria?"