A fatal car bomb attack in Turkey's Gaziantep overshadowed May Day gatherings elsewhere in the country, while Istanbul police used tear gas and water cannons to disperse protesters attempting to reach Taksim Square.

The blast targeted a police headquarters in the southeastern city at around 9:20am local-time. Gunmen in two cars fired on the entrance of the multi-story building, prompting a brief firefight with police, local Hürriyet daily reported. One of the vehicles rigged with explosives then detonated and the other was able to escape. Two officers were killed and at least 18 others injured, along with four civilians, the provincial governor's office said.

The moment of the explosion was captured on security camera footage broadcast by local media outlets, while pictures and video of the aftermath showed extensive damage to the surrounding area and wounded and dead sprawled amongst the debris.

It was the latest in a series of deadly blasts to hit Turkey and sixth in a major urban area this year alone. The Islamic State (IS) and Kurdish militants have been blamed for previous attacks, but no group has yet claimed responsibility for the one on Sunday. Unidentified sources cited by a number of Turkish outlets said an IS member was responsible.

Planned May Day celebrations in Gaziantep, as well as 130 miles away in Adana were subsequently cancelled, CNN Turk reported, while security forces in the capital of Ankara arrested four alleged IS militants thought to be planning an attack on parades.

In Istanbul, thousands of trade unions, NGO, and political party members gathered in Bakirkoy district to mark May 1, International Workers' Day, where organizers had agreed to assemble in order to avoid clashes with police. Separate smaller groups defied a massive security presence in an attempt to march on Taksim Square, but were quickly dispersed.

Police pepper sprayed then quickly arrested a group of leftist demonstrators gathered in Besiktas neighborhood in the mid-morning. Plain-clothed officers hustled a group of at least a dozen men on to a waiting bus, their eyes still streaming from the effects of the pepper spray.

In nearby Mecidiyekoy, a large contingent of riot police used water cannons and tear gas to disperse protesters.

One man was killed by a water cannon, seemingly while attempting to cross the road, according to DHA.

Authorities deployed up to 15,000 officers and 120 water cannons across Istanbul as part of a huge security operation. Helicopters circled from the early morning and access to Taksim Square and Istiklal, a main commercial thoroughfare, was entirely blocked off with metal barriers.

Taksim Square has a special significance for groups involved in International Workers' Day events. At least 34 people died there in 1977 after unidentified gunmen shot into a crowd hundreds of thousands strong, causing mass panic. The anti-government Gezi Park protests of 2013 also centered around the square, and in recent years access has been tightly restricted on May 1.