Soldiers in Mali’s capital shot their way into a Radisson Blu hotel and liberated dozens of captives after a 10-hour siege by Islamist gunmen that left 27 people dead, including five attackers, ending one of the biggest hostage standoffs in recent years.

Troops from France—the former colonial power—and United Nations peacekeepers blocked roads while Malian soldiers with Kalashnikov rifles fought their way to the top floor of the...