New York Mayor Bill de Blasio has confirmed he will boycott the city's St Patrick's Day parade due to the effective exclusion of the LGBT community from the event.

He is the first mayor in over 20 years to do so.

"I simply disagree with the organisers of that parade in their exclusion of some individuals in this city," he said in a news conference, according to the New York Times.

However, Mr de Blasio stopped short of barring city employees from marching in uniform, disappointing many LGBT advocacy groups.

In an open letter, they said the presence of uniformed personnel at the parade sent a clear message that the lives and safety of LGBT people were not respected.

They said: "The presence of uniformed police and firefighters in such a procession sends a clear signal to LGBTQ New Yorkers that these personnel, who are charged with serving and protecting all New Yorkers, do not respect the lives or safety of LGBT people. 

"It confirms the practice of the NYPD and FDNY at times of targeting certain communities for discrimination. 

"What's more, it betrays the current work of high level government agencies and human rights advocates working internationally against the current wave of extreme anti-LGBTQ legislation and discriminatory practices occurring in countries such as Nigeria, Uganda and Russia."

However, Mr de Blasio dismissed the idea of uniformed workers being barred from participating.

"Uniformed city workers have a right to participate if they choose to, and I respect that right," he said.

The last mayor to boycott the parade was David Dinkins in 1993.