Abuja - The leader of the world's Anglicans on Wednesday visited Nigeria, his office said, expressing sympathy to the country's president over security concerns and the fate of more than 200 schoolgirl hostages.
"The Archbishop of Canterbury Justin Welby made a last-minute visit to Nigeria today to offer his heartfelt sympathy for the recent events affecting the country," Lambeth Palace said in a statement.
During a meeting with President Goodluck Jonathan in Abuja, described by Welby's office as a "pastoral visit", the cleric expressed his "personal pain and condolence about the ongoing terrorism" affecting mainly Muslim northern Nigeria.
The talks also touched on a recent twin car bomb attack in the central city of Jos, also blamed on Boko Haram militants, which killed at least 118.
"The bombing in Jos was deeply disheartening because I know Jos very well. I came to pray with His Excellency (Jonathan) and express our condolence for the losses," Welby told reporters.
Welby added that he was "deeply grieved" by the current violence but was optimistic for the future because of Nigeria's "enormous potential".
Lambeth Palace said Welby and Jonathan prayed privately together with the Most Reverend Nicholas Okoh, the Primate who leads the Anglican Communion in Nigeria.
Welby, a former oil executive before joining the Church, has previous experience of negotiating with violent groups in the oil-producing Niger Delta region of southern Nigeria.
Last month, he told BBC radio that the 219 girls still being held by Boko Haram after their abduction on April 14 from the remote northeastern town of Chibok faced a "colossal" risk.
Brokering a deal with the group, whose five-year insurgency has killed thousands, would be fraught with danger because of its disparate structure and "irrational" nature, he added.
His visit came after reports that an Australian friend and colleague of the archbishop has been in Nigeria, allegedly at the request of Nigeria's government, to broker talks with Boko Haram.
The government in Abuja, however, has not confirmed cleric Stephen Davis' presence.
Nigeria's top military officer, Chief of Defence Staff Alex Badeh, said last week that the location of the girls is known but any rescue operation could endanger the teenagers' lives.
Boko Haram's leader, Abubakar Shekau, has indicated he would be willing to release the girls in exchange for militant fighters currently in jail.
Nigeria initially rejected the proposal outright but now appears to be considering a deal with the help of well-connected intermediaries.