(CNN) Counterterrorism forces have arrested a man suspected of being a key planner of last year's terror attack on a cafe in Dhaka, Bangladesh, a top police official said Saturday.

Jahangir Alam, 32, was apprehended Friday night in the Tangail district, about 100 kilometers (62 miles) northwest of Dhaka, Shahidul Hoque, inspector general of the Bangladesh police, told CNN. Alam appeared in court Saturday.

Two police officers and 21 captives were killed in July when armed gunmen stormed an upscale cafe and took hostages.

Another alleged attack planner, Nurul Islam Marzan, was killed in a shootout with police a week ago.

Bangladesh police escort suspect Jahangir Alam, in body armor, in Dhaka on Saturday after his arrest.

Alam is alleged to be a highly ranked leader of Jamaatul Mujahideen Bangladesh , or JMB, a local terror group that authorities accuse of being responsible for the attack, though ISIS also claimed responsibility.

Alam's suspected role was to train some of the attackers in the cafe assault, Hoque said.

He also is suspected of involvement in planning attacks on Hindu and Christian priests in the recent years, Hoque said, and allegedly led the killings of Japanese citizen Hoshi Kunio and Rajshahi University professor Rezaul Karim Siddique

Sunni Muslim extremist group

Two other men thought to be main organizers behind the cafe attack were killed last year.

Photos: Hostage situation in Dhaka Bangladesh security personnel patrol the streets of Dhaka on Saturday, July 2, after gunmen seized a bakery in the capital overnight, killing 20 hostages and two officers, according to the military. Hide Caption 1 of 13 Photos: Hostage situation in Dhaka The military says the attackers used guns, explosive devices and "a lot of sharp domestic weapons." The hostages' bodies were found after the standoff ended on Saturday. Hide Caption 2 of 13 Photos: Hostage situation in Dhaka Bangladeshi police stand guard outside the Holey Artisan Bakery cafe, where the attack took place. The cafe is in Gulshan, one one of Dhaka's most affluent neighborhoods and a diplomatic enclave. Hide Caption 3 of 13 Photos: Hostage situation in Dhaka An injured police officer is led away after the cafe attack in the early hours of July 2 in Dhaka. Hide Caption 4 of 13 Photos: Hostage situation in Dhaka Security personnel stand guard at the scene. Hide Caption 5 of 13 Photos: Hostage situation in Dhaka People carry an injured man near the cafe. Hide Caption 6 of 13 Photos: Hostage situation in Dhaka Another injured person is helped outside the cafe. Hide Caption 7 of 13 Photos: Hostage situation in Dhaka An injured police officer sits in a car. The attackers threw explosives at police as they exchanged gunfire, a source at the scene said. Hide Caption 8 of 13 Photos: Hostage situation in Dhaka Police take cover near the cafe. Hide Caption 9 of 13 Photos: Hostage situation in Dhaka Police officers take security measures. Hide Caption 10 of 13 Photos: Hostage situation in Dhaka Police stand armed at the scene of the attack. Hide Caption 11 of 13 Photos: Hostage situation in Dhaka An injured police officer is helped at the scene. Hide Caption 12 of 13 Photos: Hostage situation in Dhaka Security personnel stand guard near the cafe. Hide Caption 13 of 13

-- was killed Bangladeshi-Canadian Tamim Ahmed Chowdhury -- considered the mastermind, according to Hoque-- was killed in August , and Abdur Rahman died in October after jumping off a fifth-floor balcony while trying to escape police.

Alam was a "close aide" of Chowdhury's, Hoque said.

JMB is a Sunni Muslim extremist group that has pledged its allegiance to ISIS. It aims to transform Bangladesh into an Islamic state based on Sharia law

Bakery reopens

Although Bangladesh has dealt with terror attacks in the past, with secular bloggers, Hindu priests and others killed in cold blood, the July 1 cafe attack was of a much larger scale.

The assailants appeared to be "normal, regular guys," and their target was the Holey Artisan Bakery in the city's Gulshan district, one of Dhaka's most affluent neighborhoods and a diplomatic enclave.

The bakery reopened last week at a different venue a few blocks away from its original location.

Co-owner Ali Arsalan told CNN that it was a smaller, mostly takeaway operation inside a boutique supermarket next to a police station. He is also considering opening a new restaurant elsewhere -- but only if its safety can be assured.

"Security is our paramount concern," Arsalan said. "We just don't want to run the risk of a similar thing happening again. We will do everything we can to make sure the customers, ourselves, our staff are well protected."