Gunmen have attacked a wedding convoy in Nigeria's northeastern state of Borno, killing more than 30 people, including the groom in a suspected ambush.

The attack happened on Saturday on the notorious Bama-Banki road when the wedding party was making its way back to the state capital, Maiduguri, after the ceremony in Michika, in nearby Adamawa state.

Adamawa state spokesman Ahmad Sajoh said the groom and guests were driving home when they were attacked on the highway that runs alongside forests that are a known hideout of the armed group Boko Haram.

A government spokesman said Islamic fighters were suspected of being responsible for the attack.

"It was a gory scene," said a driver, who said he had seen the dead bodies on the highway.

The driver, who did not wish to be named, told the AFP news agency that many of the victims appeared to have suffered gunshot wounds.

"All the victims were brutally murdered by the attackers. My passengers and I were visibly shocked when we met the dead bodies lying by the highway," he said.

Army and police officials in the area were not immediately available for comment. But a security source who described the incident as "brutal and callous" said the bodies had been transferred to a hospital in Maiduguri.

Violent attacks are not uncommon in northeastern Nigeria, where the army has launched an offensive to end an insurgency by the armed group, Boko Haram.

Last week suspected gunmen attacked a military checkpoint on the road and witnesses said they killed at least four security force members.

Attacks continue though the military has driven fighters from major towns in the northeast under a more than five-month-old state of emergency.