A convoy carrying security personnel of Nigerian President Muhammadu Buhari was attacked by gunmen on Tuesday night ahead of a visit to his home state in the northwest, the presidency said on Tuesday.
President Buhari was not in the convoy when assailants opened fire on several vehicles, wounding two people.
The attack is yet another reminder of the widespread insecurity in Africa's most populous country.
Mr Buhari is due to visit his home town of Daura in Katsina state over the weekend to celebrate a Muslim festival.
The gunmen opened fire near Daura on the convoy carrying the security team, including officers of the Department of State Services (DSS), presidential protocol and press office, the presidency said in a statement on Tuesday night.
"The attackers opened fire on the convoy but were repelled by military, police and DSS officers," the presidency said.
"Two people in the convoy are being treated for minor injuries. All other personnel have arrived safely in Daura.
The Nigerian security forces are deployed on multiple fronts: in the north-east, a jihadist insurgency has been raging since 2009, in the northwest and the centre, multiple criminal gangs of all kinds are rampant and the south-east is regularly the prey of separatist agitations.