Police reinforcements are being sent to the embattled port of Calais in an attempt to prevent increasingly desperate attempts by migrants to gain access to the UK.

An extra 34 officers will be sent to the town, where close to a hundred migrants tried to storm a ferry leaving for Dover on Wednesday, the local préfet (prefect) has confirmed.

Port authorities said about 85 migrants had pushed through a security gate, while others climbed over fences. According to witnesses, the migrants attempted to board a MyFerryLink vessel bound for England, but staff on board raised the ramp so they could not get on. A further 250 migrants stormed the security of the port, but were stopped by police.

A spokeswoman said: "MyFerryLink can confirm an incident took place in Calais, whereby several migrants entered the port and attempted to board the MyFerryLink Berlioz. The crew took immediate action to ensure the ship's security and the attempt was unsuccessful."

A spokesman for P&O Ferries said staff had written to the préfet and the head of the chamber of commerce to demand more security for the port. "What we saw happen yesterday should never have happened," said Chris Laming, communications director at P&O. While disturbances caused by migrants attempting to board ships bound for the UK were common, he said, in P&O's experience, Wednesday's events were unique.

"We have never seen anything like this before, even in the days of Sangatte," Laming said. "Over the summer, when queues have been building around the port, we have seen migrants trying to gain access to lorries and caravans. We are very concerned and are having meetings with all the authorities to ensure the safety of our staff and passengers."

After dwindling for years, the number of migrants in Calais has ballooned in recent months, with an estimated 1,000-1,400 migrants in the town and immediate region trying to enter the UK, according to the UNHCR.

The agency said that when the informal camp, known as the jungle, was cleared in 2009, many of the migrants had fled Afghanistan and travelled through Turkey and Greece. Today's migrants are mainly from Somalia, Sudan and Eritrea, with others fleeing the conflict in Syria, said s UNHCR spokesman, William Spindler.

"While we have seen similar or even higher levels of migrants before, what seems to be getting worse is the desperation, with people willing to take ever greater risks," he said.

The migrants are likely to have travelled through north Africa to get to Europe via entry points such as the island of Lampedusa in Italy, he said, adding that they were living in appalling conditions in squats in the town. "There is no water, no toilets; they are infested with rats," he said. "They tend to keep a low profile or they are dispersed."

The mayor of Calais threatened to shut the port unless Britain helped deal with the rising number of migrants trying to cross the Channel. "I could take the decision to block the port … I could bring pressure to bear," Natacha Bouchart told reporters in Paris after a meeting with France's interior minister, Bernard Cazeneuve. She recognised such a move would be illegal but said she wanted to make a "strong gesture towards the British".

Bouchart has long been a fierce critic of immigration policy in the UK, which she said was "considered an El Dorado" by immigrants. She complained that London had called for increased security at Calais but was not contributing enough to the project, which costs €10m (£8m) a year.

The situation in Calais, which has struggled with large numbers of migrants trying to gain access to the UK for more than a decade, has deteriorated further in recent months.

Bouchart and Cazeneuve have agreed to open a day centre in Calais for migrants and a night shelter for women and children.

Cazeneuve met the UK home secretary, Theresa May, last month. In a joint statement, they said: "The increase in migrant numbers seen in Calais and its regions since the spring of 2014 has brought very difficult economic, social and public order problems. We have a duty to strengthen our efforts and find new solutions to alleviate the impact of these migrant numbers on the Calais population and its economy, and to prevent illegal immigration.

"We have already bolstered security in Calais, upgraded technology and equipment, and are investing further together in strengthening port infrastructure. We agreed that this work will continue. We also agreed to explore ways to ensure that those genuinely in need of protection or who are victims of trafficking are given the necessary support."