The Libyan coast guard is threatening and endangering the lives of migrants in need of help on the Mediterranean Sea, humanitarian groups said on Wednesday.

During a chaotic rescue operation in international waters off Libya’s coast on Tuesday, coast guard vessels fired gunshots into the air and boarded a boat filled with migrants trying to leave the country’s shores.

Dozens of people jumped off the boat in panic, putting their lives in danger at a time when lifeboats were already overcrowded.

The incident is the latest in a series of similar confrontations between nongovernmental organizations and Libyan authorities in the Mediterranean, which suggests Libya is taking a more aggressive stance in stopping the flow of migrants from its borders.

Earlier Tuesday, two Libyan-flagged boats harassed rescue ships coming to the aid of migrants, who were crammed onto small, overloaded and unsafe dinghies. One Libyan boat crew momentarily aimed their weapons at a Save the Children rescue ship.

It’s not the first time it has happened. In January, a Doctors Without Borders ship came under fire from the Libyan coast guard. And earlier this month, another NGO vessel nearly collided with a coast guard boat that appeared to be trying to prevent the rescue of a migrant boat. Libya’s navy claimed it was the other way around — blaming the German charity Sea Watch for impeding its own rescue operations.

The growing tensions come at a time when the number of migrants who drown taking the route from Libya to Italy is close to record levels, with more than 1,200 dying so far this year.

The route is so deadly because smugglers overload the small, rubber dinghies with too many people in an effort to make as much money as possible. Many boats fall apart at the seams or capsize when a big wave hits.

On Wednesday, more than 30 people drowned in the same stretch of sea. Most of the dead were toddlers.

New tragedy btw Libya & Italy today with @moas_eu rescuing 100s of #refugees & #migrants while at least 30, including many kids, have died pic.twitter.com/esu1usFJc4 — Gerry Simpson (@GerrySimpsonHRW) May 24, 2017

Tuesday’s rescue was carried out by three ships run by Save the Children and Doctors Without Borders or MSF (for Médicins Sans Frontières), as well as a smaller German volunteer group called Jugend Rettet.

More than 1,600 people were rescued during the course of the day, in an area 13 nautical miles from the Libyan coast, in international waters.

Related: Aid groups rescue over 1,600 migrants in the Mediterranean in a single day

The Iuventa, Juggend Rettet’s ship, was closest to the migrant boat when the shots were fired.

“Our rescue crew saw the coast guard firing close to legs of the people sitting on the tubes of the rubber boat and over their heads. Both with handheld automatic guns and the installed automatic gun on the coast guard ship,” said Julian Pahlke, a volunteer on the Iuventa.

The group posted a picture on its Facebook page of what appears to show a person pointing a gun at a boat full of migrants in life jackets.

Annemarie Loof, of MSF, said in a statement that two armed Libyan coast guardsmen stepped onto one of the rubber boats and took phones, money and other belongings from the passengers.

“The Libyan coast guard showed very little regard for the well-being of the people in the boats in distress,” she said. “Their behavior was reckless — if not directly threatening — to the people on the boats.”

Related: Fewer migrants are crossing the Mediterranean than last year. But almost as many are dying.

Save the Children said the actions of the Libyan coast guard “endangers lives.”

“This type of aggressive behavior during rescues of multiple dinghies is extremely dangerous and endangers lives. Our role as NGOs in the search-and-rescue zone is to stop people drowning. The actions of the Libyan coast guard yesterday posed a direct risk to boats in distress,” a spokesperson said on Wednesday.

A spokesman for the Libyan coast guard denied that its boats had targeted a migrant boat.

“Yes, the coast guard did shoot, but it targeted a boat for smugglers and not migrants. They killed three smugglers, arrested two, and their boat was destroyed,” the coast guard’s Ayoub Qassem told The World.

Two small, unidentified boats were also present in the area where the rescue was taking place. One of the vessels was boarded by the coast guard and taken away.

“[The coast guard] dealt with the migrants in a very delicate way because they were in a rubber boat, so the coast guard tried not to shoot at the boat for it not to sink,” Qassem said.

He added that officials took 237 people he described as “illegal immigrants” back to Libya.

No safe place

Migrants trying to reach Europe from Libya face peril on both sea and land. Libya holds thousands of migrants held in detention centers, where rights groups say torture, sexual abuse and forced labor are commonplace. The United Nations has described the centers as “inhumane” and called for their closure.

Libya is the main transit point for migrants and asylum-seekers from countries across Africa, and parts of Asia, trying to reach Europe.

Insecurity and lawlessness in the country has increased since the ousting of longtime dictator Muammar Gaddafi in 2011 and the civil war that followed. Today, rival power centers and militias are locked in a battle for control. A UN-backed Government of National Accord rules in the capital Tripoli, but a parallel parliament exists in eastern Libya.

Libyan authorities blame a lack of help from neighboring countries in preventing migrants from reaching Libya in the first place, and have repeatedly sought the assistance of the international community to solve the issue.

Credit: Alex Newman/PRI

Meanwhile, smugglers in Libya have taken advantage of a weakened state to increase their operations. This year, almost 60,000 migrants have boated from Libya to Italy, which is a primary route.

After historic arrival numbers in 2016, the European Union raised its support for the Libyan coast guard earlier this year to prevent migrants from reaching its shores. In January, it announced $3.4 million to help train and equip Libyan authorities, adding to an already existing training program. The Libyan coast guard has reportedly turned back 6,350 migrants who were attempting to cross the Mediterranean so far this year.

MSF said the EU is complicit in making the seas even more deadly by continuing to support the coast guard.

“Knowing that the Libyan coast guard has been receiving training and support from the European Union makes the incident all the more disturbing. We believe that the Italian and European authorities should not be providing support to the Libyan coast guard, either directly or indirectly. This support is further endangering people’s lives,” Loof said.

Richard Hall reported this story in the Mediterranean from aboard the Vos Hestia, a boat chartered by Save the Children for their search-and-rescue operations at sea.