Barack Obama welcomed Nigeria’s new president to the Oval Office on Monday and praised him for working to bring “safety, security and peace” to a nation challenged by economic strains, a history of corruption and violence unleashed by the Islamic extremist group Boko Haram.

Obama met with President Muhammadu Buhari less than eight weeks after Buhari took office, to underscore the importance the US attaches to good relations with Nigeria.

The US president said Buhari had “a very clear agenda in defeating Boko Haram and extremists of all sorts inside of his country.

“And he has a very clear agenda in terms of rooting out the corruption that too often has held back the economic growth and prosperity of his country,” Obama said.

Obama, speaking to reporters at the outset of the meeting, said the US hoped to partner with the African nation “so that Nigeria ends up being not only an anchor of prosperity and stability in the eastern part of the continent, but can also be an outstanding role model for developing countries around the world”.

He said he would discuss with Buhari how the two nations can cooperate on counter-terrorism and how the US “can be helpful in addressing some of the corruption issues that have held Nigeria back”.

Buhari said Nigeria would be “ever grateful” to the US for its support of free elections in his country. Buhari said US and European pressures to ensure the election was “fair and credible led us to where we are now”.

US relations with Nigeria soured over failures by the government and military, including the inability to locate more than 200 schoolgirls, most of them Christian, who were kidnapped by Boko Haram from the northern town of Chibok in April 2014. The abduction led to international condemnation and a campaign to “Bring Back Our Girls” that reached as far as the White House.

The then president Goodluck Jonathan was angered by the US refusal to sell his government helicopter gunships and retaliated by halting a US military training programme.

Relations are expected to improve under Buhari, a 72-year-old former military dictator who has pledged allegiance to democracy and promised to address US concerns.

Obama extended his invitation for a visit to Buhari almost immediately after he was declared the winner of the March election.

“This feels to us like Nigeria is at an important moment in which there can be real reforms across the board,” Grant Harris, the senior director for African affairs at the National Security Council, told reporters last week.

“We’re looking forward to what we can do with a president who has staked out an agenda that we think is the right agenda at the right time.”

Nigeria’s new leader has been criticized for being slow to form a cabinet. He has yet to name any ministers.

Last week, Buhari fired the entire top echelon of the military, which he has accused of corruption that prevents what once was Africa’s mightiest armed force from curbing the Islamist insurgency based in Nigeria’s northeast. The insurgency has killed more than 13,000 people and driven another 1.5 million from their homes.

Besides the Oval Office meeting with Obama, Buhari is to meet with Vice-President Joe Biden, Secretary of State John Kerry and other senior administration officials.