"This operational cell of about 10 people, some of whom had returned from Syria, was on the point of launching significant terrorist attacks in Belgium," Thierry Werts of the Belgian federal prosecutor's office told a press conference in Brussels.
"During the search, certain suspects immediately opened fire at special forces of the police with automatic weapons. They opened fire for several minutes. Two suspects were killed and a third was arrested."
After an emergency meeting with his security chiefs, Prime Minister Charles Michel said the raid showed Belgium's "determination to fight those who want to spread terror".
Belgian authorities raised the security alert for official buildings to its second highest level, saying that the thwarted attack had intended to target police.
The prosecutor's office said operations were still under way after 00:30 Friday (23:30 GMT Thursday) and arrests were still expected.
Leaders of the country's Jewish community decided to cancel classes and close schools Friday in Antwerp and Brussels after they were informed that they were potential targets, according to the website Joods Actueel.
In May 2014, a suspected Islamist shot four people dead at the Jewish Museum in Brussels. Frenchman Mehdi Nemmouche, who had been in Syria, has been charged with murder.
No police or civilians were hurt in the operation in Verviers, a city with a large Muslim population some 125 kilometres (70 miles) from Brussels, prosecutors said.
In video footage shown on Belgian television, gunshots and explosions could be heard for several minutes and a blaze apparently erupted in the property.
Werts said that "even after one of the suspects was lying on the ground injured, he continued to fire."
"I heard two explosions. I left, then I saw two young people run -- Arab types between 25 and 30 -- who hurtled down in the dark with woolly hats on their heads," local resident Yilmaz, 41, told the Libre Belgique newspaper.
Redouane, 65, a Belgian of Moroccan origin, said: "People are terrorised. They cannot leave their homes. There are terrorists in Verviers ... My wife and I cannot take it anymore."
Another local resident said "machineguns were firing for about 10 minutes."
- Jihadist networks -
Some 325 people have left Belgium to fight with the Islamic State and other groups in Iraq and Syria, according to officials, giving the country the highest per capita number of residents becoming jihadists in Europe.
The men targeted in Verviers had been under surveillance since returning from Syria a week ago and were believed to be about to spring an attack, prosecutors said.
Prosecutors said they had found "no link at this stage" to the Paris attacks.
But earlier Thursday, investigators said they suspected a Belgian man could have supplied Jewish supermarket gunman Amedy Coulibaly with his weapons.
The suspect, Neetin Karasular, had bought a car belonging to Coulibaly's partner Hayat Boumeddiene, who has since fled France, apparently reaching Syria.
Karasular handed himself into police on Tuesday, saying he had been in contact with Coulibaly in recent months and had tried to "swindle" the Frenchman over the car deal, but was scared after the Paris attacks.
"The issue of weapons is under investigation," prosecutors' office spokesman Eric Van der Sijpt told AFP.
Investigators say they have found documents at Karasular's house showing he negotiated with Coulibaly over weapons, including a Tokarev pistol of the sort used during the supermarket attack, Belga news agency reported.
Karasular will appear before a magistrate in Charleroi on Monday to find out if he will remain in custody.
Spain meanwhile opened an investigation Thursday into Coulibaly and Boumeddiene's visit to Madrid shortly before the attacks.
Turkish authorities say Boumeddiene crossed into Syria on January 8. She had arrived in Istanbul on a flight from Madrid before the Paris attacks took place.