UNITED NATIONS — The United Nations said on Friday that at least 15 peacekeepers, all from Tanzania, were killed in the eastern Democratic Republic of Congo by militant extremists. It was the deadliest assault on the organization’s peacekeeping forces in nearly a quarter century.

Five Congolese soldiers also died and at least 40 other people were injured when the militants attacked a United Nations base in the North Kivu region on Thursday evening, the organization said in a statement from its mission in Kinshasa, the Congolese capital.

United Nations peacekeeping officials attributed the attack to a militant group known as the Allied Democratic Forces, which has its origins in neighboring Uganda and is accused of killing hundreds of people over the past three years.

The Ugandan government has sought to link the group Al Qaeda and the Shabab, the Islamic militants that have terrorized Somalia. But while the Allied Democratic Forces are mostly Muslim, United Nations peacekeeping officials said, the group does not appear to be driven by religous extremist ideology but more by profit. Its members prey on the mining industry in North Kivu through extortion and other gangster-like behavior.