Muhammadu Buhari, who last led this country as a military dictator three decades ago, was sworn in as its elected president Friday.

Buhari takes over amid high expectations that he can resolve problems of chronic corruption and poor administration that have driven oil-rich Nigeria’s economy to near-collapse, even while the country is under threat from Boko Haram militants who have given the Islamic State its first foothold in sub-Saharan Africa.

Secretary of State John F. Kerry led the U.S. delegation to the inauguration in a symbolic show of the Obama administration’s willingness to strengthen a relationship that has been severely strained in recent years under former president Goodluck Jonathan .

Kerry met briefly with Buhari after the inaugural ceremony, the new president’s first private session with a foreign dignitary.

Secretary of State John Kerry is escorted as he arrives at Nnamdi Azikiwe International Airport in Abuja, Nigeria. Kerry is attending the inauguration of Muhammadu Buhari as President of Nigeria. (Susan Walsh/Reuters)

Accompanied by Gen. David M. Rodriguez, head of the U.S. Africa Command, Kerry planned to discuss an expansion of U.S. military training, along with intelligence and logistics assistance, American officials said before the meeting.

The Defense Department’s frustration with Nigerian military corruption, incompetence and human rights abuses — including extrajudicial execution and incommunicado detention — led to suspension of a U.S. military training program early this year.

Since then, a coalition of troops from Chad, Cameroon and Niger have led the fight against Boko Haram, driving the militants from much of the territory they controlled in northeastern Nigeria. But rather than suffering defeat, military officials believe that Boko Haram fighters largely withdrew from the area to regroup, and militant attacks in the region have increased in recent weeks.

About 7,000 Nigerians have been killed and almost 1 million displaced in Boko Haram violence since 2010, according to Human Rights Watch. In a March video purportedly released by the Islamic State, that group accepted a pledge of allegiance by Boko Haram leader Abubakar Shekau.

In addition to conscripting young men, Boko Haram militants abducted Nigerian women and girls, who are said to be held as sex slaves. Hundreds of them, some held for years and many apparently now pregnant teenagers and pre-teens, were freed in the regional counteroffensive this spring. Still unaccounted for are more than 200 young girls captured last May from a school in the town of Chibok.

Although human rights concerns have hampered U.S. cooperation with the Nigerian military, a senior State Department official said they were “manageable things that we can work out so that we can work together.”

“And we believe they’re going to cooperate with us as a full partner on that,” the official said of the Buhari government.

“We have every indication in our conversations” with Buhari “that he’s interested in a close relationship . . . [and] a new chapter” in U.S.-Nigerian relations, said the official, who spoke on condition of anonymity under ground rules set by the State Department.

While the Obama administration is most concerned about the fight against Boko Haram, it is Nigeria’s crippled economy that will probably pose as Buhari’s biggest challenge.

As Kerry drove in a convoy from the airport into the capital city early Friday, he passed lines up to a half-mile long of cars waiting for gasoline. Gasoline stations have been dry since at least last week because of a dispute between Jonathan’s government and fuel distributors. Airlines have canceled many flights, cellphone towers have gone dead and many businesses and homes are without power.

Nigeria is Africa’s biggest economy and largest oil producer. Falling international oil prices and a generous state subsidy for locally consumed fuel have cut government income. But both state and private-sector corruption and inefficiency have long plagued the energy sector and virtually every other part of the economy.

Buhari, 72, first took power here in a 1983 military coup. During his campaign this year against Jonathan, he said he was a convert to democracy and pledged an administration of qualified technocrats that would stem the power of state governments.

Although he praised Jonathan for ceding power in the first-ever victory by an opposition candidate in a presidential election here, Buhari also accused his predecessor of “sabotage” during the transition period, charging that Jonathan had engineered the fuel crisis to undermine him.

But Buhari extended an olive branch in his inaugural speech, saying that “Nigerians have shown their commitment to democracy,” and he thanked those “who did not vote for us.”

“I intend to keep my oath and serve as president of all Nigerians,” he said. “I belong to everybody. And I belong to nobody.”

After thanking Cameroon, Niger and Chad for committing their armed forces to the fight against Boko Haram inside Nigeria, Buhari said he wanted to “assure the wider international community of our willingness to cooperate” on a host of pressing issues, including cybersecurity and the fight against terrorism.

Kerry was scheduled to travel to Geneva later Friday for weekend meetings with his Iranian counterpart, Mohammad Javad Zarif, on ongoing nuclear talks.