LAGOS, Nigeria — Nigeria’s President Muhammadu Buhari has apologized for plagiarizing President Obama’s 2008 victory speech and says he will punish those responsible.

The announcement comes as Obama is set to meet Buhari, the leader of Africa’s largest economy and most populous country, next week in New York.

Several sentences were almost identical to Obama’s in a speech Buhari made Sept. 8 launching his campaign “Change Begins With Me.”

Buhari said, “We must resist the temptation to fall back on the same partisanship, pettiness and immaturity that have poisoned our country for so long.”

Obama said, “Let us resist the temptation to fall back on the same partisanship and pettiness and immaturity that has poisoned our politics for so long.”