DHAKA -  Three alleged extremists were killed Tuesday in a raid by Bangladesh police as security was stepped up before Pope Francis's landmark visit to the Muslim-majority nation, officials said.

Police said the trio died in suspected suicide blasts after they opened fire and threw bombs at anti-terror officers who cordoned off a house where they were hiding near the Indian border.

Rapid Action Battalion police surrounded the home following a tip-off and urged those holed up inside to surrender but they opened fire instead, the force's local commander Mahbubul Alam told AFP.

"Moments later there were several loud explosions and the house caught on fire. Later we found three mangled bodies, one of them with a severed head," he said.

He said the three were active members of Jamayetul Mujahideen Bangladesh (JMB) - a homegrown militant group blamed for a string of deadly attacks on foreigners, atheist bloggers, rights activists and religious minorities in recent years.

Since 2015 at least three Christians including two converts from Islam have been hacked to death in attacks blamed on the JMB. Hand grenades, pistols, explosives and chemicals to make bombs were found at the home. Pope Francis arrives in Bangladesh on Thursday for a three-day visit, the first by a Vatican leader in 31 years.

The trip will be dominated by the plight of more than 620,000 Rohingya Muslims who have fled ethnic unrest in Myanmar and taken refuge in Bangladesh.

Bangladesh authorities have tightened security in the capital, with police patrolling around Christian churches and places where Francis will visit. "There will be the highest security measures for the pope," Dhaka police spokesman Masudur Rahman told AFP. "We have taken the measures in consultations with the Christian community here," he added.

The pope will meet a group of Rohingya refugees in Dhaka and conduct a mass at Suhrawardi Udyan, a colonial-era park in the capital, with at least 80,000 people expected to attend.

Christians make up less than 0.5 percent of Bangladesh's population and the minority has in recent years faced attacks by Islamist radicals. In July last year militants stormed a Dhaka cafe and massacred 22 hostages including 18 foreigners in an attack claimed by the Islamic State group.

However, the government has denied the international militants' involvement and security forces have killed more than 70 alleged militants since the cafe attack.