Islamic State said via its Amaq news agency that it killed or wounded more than 40 soldiers in the northeast Nigerian state of Borno in two separate attacks on Tuesday.
The group said militants attacked a military post in Baga and killed at least 15 soldiers before carrying out a second attack on an army barracks in the town of Benisheik, where they killed around 25 more.
Locals and military sources told Reuters there were clashes between insurgents and soldiers in the state on Monday and Tuesday. Reuters was unable to immediately verify the number of people killed or injured in those clashes.
An army spokesman did not immediately respond to phone calls requesting comment.
More than 30,000 people have been killed in northeast Nigeria since 2009 in an Islamist insurgency.
At the weekend at least 65 people were killed in Borno, the birthplace of the insurgency, when militants targeted civilians travelling from a funeral.
Locals and military sources told Reuters there were clashes between insurgents and soldiers in the state on Monday and Tuesday.