Gunmen stormed a museum in Tunisia’s capital on Wednesday, leaving 20 people dead, including 18 foreign tourists, after failing to launch an assault on the national assembly as lawmakers debated an antiterrorism bill.

The rare attack, in central Tunis at one of the country’s most popular tourist sites, cast a pall over one of the Arab Spring’s few success stories. It sent tremors of fear through the capital, which had been immune to attacks on security forces along Tunisia’s borders for which al Qaeda claimed responsibility.

It also raised fears that the assault would pave the way for significant reversals in democratic overhauls the nation secured during a halting political transition. […]