Relatives wait for news of their relatives missing after the Dhaka factory collapse.

The owners of two factories in an eight-storey building in the Bangladeshi capital Dhaka that collapsed on Wednesday killing hundreds and trapping thousands have handed themselves in to police.

Mahbubur Rahman Tapas and Balzul Samad Adnan allegedly forced staff to continue working in the building, ignoring warnings that cracks had appeared in the structure of the Rana Plaza building in the suburb of Sava for weeks before the catastrophe.

Two engineers, Imtemam Hossain and Alam Ali, have also been detained by police.

Deputy chief of Dhaka police Shyami Mukherjee said the two are accused of causing "death due to negligence", according the AFP news agency.

336 bodies have already been pulled from the rubble, and of the estimated 3,000 people working there, 600 are still missing.

Most of the country's textile workers are young women.

The men who own the New Wave Fashions and New Wave Buttons factories in the plaza gave themselves up early on Saturday.

The building's owner, Mohammed Sohel Rana, is believed to have gone in to hiding and his wife has also been detained.

"Those who're involved, especially the owner who forced the workers to work there, will be punished," Prime Minister Sheikh Hasina told lawmakers on Friday.

"Wherever he is, he will be found and brought to justice," the prime minister added.

24 survivors have so far been rescued from the building, and rescuers are battling to free an estimated 40 more trapped in an air pocket between the collapsed fifth and eighth floors.

Oxygen cylinders and bottles of water have been passed to them.

Hundreds of relatives of the missing are on the streets watching the operation as it unfolds, many clutching photographs of their loved ones.

Abul Basar wept as he waited to hear if his wife, who worked in one of the factories, had survived.

"My son says that his mother will come back some day, she must return," he said to the BBC.

The tragedy has sparked rioting in Bangladesh, with protesters demanding reform of conditions for factory workers and the arrest of those responsible for the deaths clashing with police who broke up crowds with rubber bullets.

Cars have been burnt, streets blockaded and factories attacked by the protesters, and police were guarding other factory buildings.

The Bangladeshi textiles industry has boomed in recent years, with many western companies taking advantage of the country's low labour costs, making it the second largest textiles manufacturer in the world.

Approximately 80 percent of the country's export income is made up of textiles exports to Europe and the US.

British clothes retailer Primark has admitted that one of its suppliers was based in the Rana Plaza.

Critics have attacked the poor working conditions of many of Bangladesh's textile factory workers, with many facing low pay, abuse of their rights and dangerous working conditions.

Five months ago a fire at a Dhaka textiles factory that supplied US retailer Walmart killed hundreds.