Multiple explosions blasted near an oil depot outside the northeast Nigerian city of Maiduguri on Tuesday and the military said soldiers blew up three vehicles laden with explosives.
A fourth vehicle exploded, apparently set off by a suicide bomber.
Fifteen civilians and six suicide bombers died while five soldiers and 12 civilians were wounded, said defence ministry spokesman Brig Gen Chris Olukolade.
A surviving suicide bomber was arrested, he said. Eight vehicles were destroyed in addition to the ones carrying explosives.
"Three of the four explosive-laden vehicles were demobilized by shots fired at them by soldiers at the checkpoint shortly before the explosions that rocked the area," Olukolade said in a statement. He said the four vehicles appeared headed for the oil depot.
It's the latest in a string of deadly attacks in an Islamic uprising that has killed nearly 1,500 people in northeast Nigeria this year.
Three blasts damaged the perimeter fence of Peace-FM radio station located opposite an oil depot and fuel station of the state-owned Nigerian National Petroleum Corp, said a security official who spoke on condition of anonymity because he is not permitted to give information to journalists.
It is located at Mulai, just 5 kilometers (3 miles) outside Maiduguri, the capital of Borno state that is the birthplace of the Boko Haram terrorist network.
On March 14, Islamic extremists attacked the main military barracks in Maiduguri and freed hundreds of detainees. The military said it killed scores of freed detainees.
An Amnesty International report said more than 600 people were killed, most unarmed detainees shot by soldiers, in the deadliest day of the 4-year-old uprising.